home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Tk / xlib / X11 / Xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-31  |  100.5 KB  |  4,327 lines

  1. /* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #ifdef USG
  31. #ifndef __TYPES__
  32. #include <sys/types.h>            /* forgot to protect it... */
  33. #define __TYPES__
  34. #endif /* __TYPES__ */
  35. #else
  36. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  37. #undef _POSIX_SOURCE
  38. #include <sys/types.h>
  39. #define _POSIX_SOURCE
  40. #else
  41. #include <sys/types.h>
  42. #endif
  43. #endif /* USG */
  44.  
  45. #ifdef MAC_TCL
  46. #   include <X.h>
  47. #   define Cursor XCursor
  48. #   define Region XRegion
  49. #else
  50. #   include <X11/X.h>
  51. #endif
  52.  
  53. /* applications should not depend on these two headers being included! */
  54. #ifdef MAC_TCL
  55. #include <Xfuncproto.h>
  56. #else
  57. #include <X11/Xfuncproto.h>
  58. #endif
  59.  
  60. #ifndef X_WCHAR
  61. #ifdef X_NOT_STDC_ENV
  62. #define X_WCHAR
  63. #endif
  64. #endif
  65.  
  66. #ifndef X_WCHAR
  67. #include <stddef.h>
  68. #else
  69. /* replace this with #include or typedef appropriate for your system */
  70. typedef unsigned long wchar_t;
  71. #endif
  72.  
  73. typedef char *XPointer;
  74.  
  75. #define Bool int
  76. #define Status int
  77. #define True 1
  78. #define False 0
  79.  
  80. #define QueuedAlready 0
  81. #define QueuedAfterReading 1
  82. #define QueuedAfterFlush 2
  83.  
  84. #define ConnectionNumber(dpy)     ((dpy)->fd)
  85. #define RootWindow(dpy, scr)     (((dpy)->screens[(scr)]).root)
  86. #define DefaultScreen(dpy)     ((dpy)->default_screen)
  87. #define DefaultRootWindow(dpy)     (((dpy)->screens[(dpy)->default_screen]).root)
  88. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  89. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  90. #define BlackPixel(dpy, scr)     (((dpy)->screens[(scr)]).black_pixel)
  91. #define WhitePixel(dpy, scr)     (((dpy)->screens[(scr)]).white_pixel)
  92. #define AllPlanes         ((unsigned long)~0L)
  93. #define QLength(dpy)         ((dpy)->qlen)
  94. #define DisplayWidth(dpy, scr)     (((dpy)->screens[(scr)]).width)
  95. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  96. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  97. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  98. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  99. #define DisplayCells(dpy, scr)     (DefaultVisual((dpy), (scr))->map_entries)
  100. #define ScreenCount(dpy)     ((dpy)->nscreens)
  101. #define ServerVendor(dpy)     ((dpy)->vendor)
  102. #define ProtocolVersion(dpy)     ((dpy)->proto_major_version)
  103. #define ProtocolRevision(dpy)     ((dpy)->proto_minor_version)
  104. #define VendorRelease(dpy)     ((dpy)->release)
  105. #define DisplayString(dpy)     ((dpy)->display_name)
  106. #define DefaultDepth(dpy, scr)     (((dpy)->screens[(scr)]).root_depth)
  107. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  108. #define BitmapUnit(dpy)     ((dpy)->bitmap_unit)
  109. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  110. #define BitmapPad(dpy)         ((dpy)->bitmap_pad)
  111. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  112. #define NextRequest(dpy)    ((dpy)->request + 1)
  113. #define LastKnownRequestProcessed(dpy)    ((dpy)->last_request_read)
  114.  
  115. /* macros for screen oriented applications (toolkit) */
  116. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  117. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  118. #define DisplayOfScreen(s)    ((s)->display)
  119. #define RootWindowOfScreen(s)    ((s)->root)
  120. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  121. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  122. #define DefaultColormapOfScreen(s)((s)->cmap)
  123. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  124. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  125. #define DefaultVisualOfScreen(s)((s)->root_visual)
  126. #define WidthOfScreen(s)    ((s)->width)
  127. #define HeightOfScreen(s)    ((s)->height)
  128. #define WidthMMOfScreen(s)    ((s)->mwidth)
  129. #define HeightMMOfScreen(s)    ((s)->mheight)
  130. #define PlanesOfScreen(s)    ((s)->root_depth)
  131. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  132. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  133. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  134. #define DoesSaveUnders(s)    ((s)->save_unders)
  135. #define DoesBackingStore(s)    ((s)->backing_store)
  136. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  137.  
  138. /*
  139.  * Extensions need a way to hang private data on some structures.
  140.  */
  141. typedef struct _XExtData {
  142.     int number;        /* number returned by XRegisterExtension */
  143.     struct _XExtData *next;    /* next item on list of data for structure */
  144.     int (*free_private)();    /* called to free private storage */
  145.     XPointer private_data;    /* data private to this extension. */
  146. } XExtData;
  147.  
  148. /*
  149.  * This file contains structures used by the extension mechanism.
  150.  */
  151. typedef struct {        /* public to extension, cannot be changed */
  152.     int extension;        /* extension number */
  153.     int major_opcode;    /* major op-code assigned by server */
  154.     int first_event;    /* first event number for the extension */
  155.     int first_error;    /* first error number for the extension */
  156. } XExtCodes;
  157.  
  158. /*
  159.  * Data structure for retrieving info about pixmap formats.
  160.  */
  161.  
  162. typedef struct {
  163.     int depth;
  164.     int bits_per_pixel;
  165.     int scanline_pad;
  166. } XPixmapFormatValues;
  167.  
  168.  
  169. /*
  170.  * Data structure for setting graphics context.
  171.  */
  172. typedef struct {
  173.     int function;        /* logical operation */
  174.     unsigned long plane_mask;/* plane mask */
  175.     unsigned long foreground;/* foreground pixel */
  176.     unsigned long background;/* background pixel */
  177.     int line_width;        /* line width */
  178.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  179.     int cap_style;          /* CapNotLast, CapButt, 
  180.                    CapRound, CapProjecting */
  181.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  182.     int fill_style;         /* FillSolid, FillTiled, 
  183.                    FillStippled, FillOpaeueStippled */
  184.     int fill_rule;          /* EvenOddRule, WindingRule */
  185.     int arc_mode;        /* ArcChord, ArcPieSlice */
  186.     Pixmap tile;        /* tile pixmap for tiling operations */
  187.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  188.     int ts_x_origin;    /* offset for tile or stipple operations */
  189.     int ts_y_origin;
  190.         Font font;            /* default text font for text operations */
  191.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  192.     Bool graphics_exposures;/* boolean, should exposures be generated */
  193.     int clip_x_origin;    /* origin for clipping */
  194.     int clip_y_origin;
  195.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  196.     int dash_offset;    /* patterned/dashed line information */
  197.     char dashes;
  198. } XGCValues;
  199.  
  200. /*
  201.  * Graphics context.  The contents of this structure are implementation
  202.  * dependent.  A GC should be treated as opaque by application code.
  203.  */
  204.  
  205. typedef XGCValues *GC;
  206.  
  207. /*
  208.  * Visual structure; contains information about colormapping possible.
  209.  */
  210. typedef struct {
  211.     XExtData *ext_data;    /* hook for extension to hang data */
  212.     VisualID visualid;    /* visual id of this visual */
  213. #if defined(__cplusplus) || defined(c_plusplus)
  214.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  215. #else
  216.     int class;        /* class of screen (monochrome, etc.) */
  217. #endif
  218.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  219.     int bits_per_rgb;    /* log base 2 of distinct color values */
  220.     int map_entries;    /* color map entries */
  221. } Visual;
  222.  
  223. /*
  224.  * Depth structure; contains information for each possible depth.
  225.  */    
  226. typedef struct {
  227.     int depth;        /* this depth (Z) of the depth */
  228.     int nvisuals;        /* number of Visual types at this depth */
  229.     Visual *visuals;    /* list of visuals possible at this depth */
  230. } Depth;
  231.  
  232. /*
  233.  * Information about the screen.  The contents of this structure are
  234.  * implementation dependent.  A Screen should be treated as opaque
  235.  * by application code.
  236.  */
  237. typedef struct {
  238.     XExtData *ext_data;    /* hook for extension to hang data */
  239.     struct _XDisplay *display;/* back pointer to display structure */
  240.     Window root;        /* Root window id. */
  241.     int width, height;    /* width and height of screen */
  242.     int mwidth, mheight;    /* width and height of  in millimeters */
  243.     int ndepths;        /* number of depths possible */
  244.     Depth *depths;        /* list of allowable depths on the screen */
  245.     int root_depth;        /* bits per pixel */
  246.     Visual *root_visual;    /* root visual */
  247.     GC default_gc;        /* GC for the root root visual */
  248.     Colormap cmap;        /* default color map */
  249.     unsigned long white_pixel;
  250.     unsigned long black_pixel;    /* White and Black pixel values */
  251.     int max_maps, min_maps;    /* max and min color maps */
  252.     int backing_store;    /* Never, WhenMapped, Always */
  253.     Bool save_unders;    
  254.     long root_input_mask;    /* initial root input mask */
  255. } Screen;
  256.  
  257. /*
  258.  * Format structure; describes ZFormat data the screen will understand.
  259.  */
  260. typedef struct {
  261.     XExtData *ext_data;    /* hook for extension to hang data */
  262.     int depth;        /* depth of this image format */
  263.     int bits_per_pixel;    /* bits/pixel at this depth */
  264.     int scanline_pad;    /* scanline must padded to this multiple */
  265. } ScreenFormat;
  266.  
  267. /*
  268.  * Data structure for setting window attributes.
  269.  */
  270. typedef struct {
  271.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  272.     unsigned long background_pixel;    /* background pixel */
  273.     Pixmap border_pixmap;    /* border of the window */
  274.     unsigned long border_pixel;    /* border pixel value */
  275.     int bit_gravity;        /* one of bit gravity values */
  276.     int win_gravity;        /* one of the window gravity values */
  277.     int backing_store;        /* NotUseful, WhenMapped, Always */
  278.     unsigned long backing_planes;/* planes to be preseved if possible */
  279.     unsigned long backing_pixel;/* value to use in restoring planes */
  280.     Bool save_under;        /* should bits under be saved? (popups) */
  281.     long event_mask;        /* set of events that should be saved */
  282.     long do_not_propagate_mask;    /* set of events that should not propagate */
  283.     Bool override_redirect;    /* boolean value for override-redirect */
  284.     Colormap colormap;        /* color map to be associated with window */
  285.     Cursor cursor;        /* cursor to be displayed (or None) */
  286. } XSetWindowAttributes;
  287.  
  288. typedef struct {
  289.     int x, y;            /* location of window */
  290.     int width, height;        /* width and height of window */
  291.     int border_width;        /* border width of window */
  292.     int depth;              /* depth of window */
  293.     Visual *visual;        /* the associated visual structure */
  294.     Window root;            /* root of screen containing window */
  295. #if defined(__cplusplus) || defined(c_plusplus)
  296.     int c_class;        /* C++ InputOutput, InputOnly*/
  297. #else
  298.     int class;            /* InputOutput, InputOnly*/
  299. #endif
  300.     int bit_gravity;        /* one of bit gravity values */
  301.     int win_gravity;        /* one of the window gravity values */
  302.     int backing_store;        /* NotUseful, WhenMapped, Always */
  303.     unsigned long backing_planes;/* planes to be preserved if possible */
  304.     unsigned long backing_pixel;/* value to be used when restoring planes */
  305.     Bool save_under;        /* boolean, should bits under be saved? */
  306.     Colormap colormap;        /* color map to be associated with window */
  307.     Bool map_installed;        /* boolean, is color map currently installed*/
  308.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  309.     long all_event_masks;    /* set of events all people have interest in*/
  310.     long your_event_mask;    /* my event mask */
  311.     long do_not_propagate_mask; /* set of events that should not propagate */
  312.     Bool override_redirect;    /* boolean value for override-redirect */
  313.     Screen *screen;        /* back pointer to correct screen */
  314. } XWindowAttributes;
  315.  
  316. /*
  317.  * Data structure for host setting; getting routines.
  318.  *
  319.  */
  320.  
  321. typedef struct {
  322.     int family;        /* for example FamilyInternet */
  323.     int length;        /* length of address, in bytes */
  324.     char *address;        /* pointer to where to find the bytes */
  325. } XHostAddress;
  326.  
  327. /*
  328.  * Data structure for "image" data, used by image manipulation routines.
  329.  */
  330. typedef struct _XImage {
  331.     int width, height;        /* size of image */
  332.     int xoffset;        /* number of pixels offset in X direction */
  333.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  334.     char *data;            /* pointer to image data */
  335.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  336.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  337.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  338.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  339.     int depth;            /* depth of image */
  340.     int bytes_per_line;        /* accelarator to next line */
  341.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  342.     unsigned long red_mask;    /* bits in z arrangment */
  343.     unsigned long green_mask;
  344.     unsigned long blue_mask;
  345.     XPointer obdata;        /* hook for the object routines to hang on */
  346.     struct funcs {        /* image manipulation routines */
  347.     struct _XImage *(*create_image)();
  348. #if NeedFunctionPrototypes
  349.     int (*destroy_image)        (struct _XImage *);
  350.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  351.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  352.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  353.     int (*add_pixel)            (struct _XImage *, long);
  354. #else
  355.     int (*destroy_image)();
  356.     unsigned long (*get_pixel)();
  357.     int (*put_pixel)();
  358.     struct _XImage *(*sub_image)();
  359.     int (*add_pixel)();
  360. #endif
  361.     } f;
  362. } XImage;
  363.  
  364. /* 
  365.  * Data structure for XReconfigureWindow
  366.  */
  367. typedef struct {
  368.     int x, y;
  369.     int width, height;
  370.     int border_width;
  371.     Window sibling;
  372.     int stack_mode;
  373. } XWindowChanges;
  374.  
  375. /*
  376.  * Data structure used by color operations
  377.  */
  378. typedef struct {
  379.     unsigned long pixel;
  380.     unsigned short red, green, blue;
  381.     char flags;  /* do_red, do_green, do_blue */
  382.     char pad;
  383. } XColor;
  384.  
  385. /* 
  386.  * Data structures for graphics operations.  On most machines, these are
  387.  * congruent with the wire protocol structures, so reformatting the data
  388.  * can be avoided on these architectures.
  389.  */
  390. typedef struct {
  391.     short x1, y1, x2, y2;
  392. } XSegment;
  393.  
  394. typedef struct {
  395.     short x, y;
  396. } XPoint;
  397.     
  398. typedef struct {
  399.     short x, y;
  400.     unsigned short width, height;
  401. } XRectangle;
  402.     
  403. typedef struct {
  404.     short x, y;
  405.     unsigned short width, height;
  406.     short angle1, angle2;
  407. } XArc;
  408.  
  409.  
  410. /* Data structure for XChangeKeyboardControl */
  411.  
  412. typedef struct {
  413.         int key_click_percent;
  414.         int bell_percent;
  415.         int bell_pitch;
  416.         int bell_duration;
  417.         int led;
  418.         int led_mode;
  419.         int key;
  420.         int auto_repeat_mode;   /* On, Off, Default */
  421. } XKeyboardControl;
  422.  
  423. /* Data structure for XGetKeyboardControl */
  424.  
  425. typedef struct {
  426.         int key_click_percent;
  427.     int bell_percent;
  428.     unsigned int bell_pitch, bell_duration;
  429.     unsigned long led_mask;
  430.     int global_auto_repeat;
  431.     char auto_repeats[32];
  432. } XKeyboardState;
  433.  
  434. /* Data structure for XGetMotionEvents.  */
  435.  
  436. typedef struct {
  437.         Time time;
  438.     short x, y;
  439. } XTimeCoord;
  440.  
  441. /* Data structure for X{Set,Get}ModifierMapping */
  442.  
  443. typedef struct {
  444.      int max_keypermod;    /* The server's max # of keys per modifier */
  445.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  446. } XModifierKeymap;
  447.  
  448.  
  449. /*
  450.  * Display datatype maintaining display specific data.
  451.  * The contents of this structure are implementation dependent.
  452.  * A Display should be treated as opaque by application code.
  453.  */
  454. typedef struct _XDisplay {
  455.     XExtData *ext_data;    /* hook for extension to hang data */
  456.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  457.     int fd;            /* Network socket. */
  458.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  459.     int proto_major_version;/* maj. version of server's X protocol */
  460.     int proto_minor_version;/* minor version of servers X protocol */
  461.     char *vendor;        /* vendor of the server hardware */
  462.         XID resource_base;    /* resource ID base */
  463.     XID resource_mask;    /* resource ID mask bits */
  464.     XID resource_id;    /* allocator current ID */
  465.     int resource_shift;    /* allocator shift to correct bits */
  466.     XID (*resource_alloc)(); /* allocator function */
  467.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  468.     int bitmap_unit;    /* padding and data requirements */
  469.     int bitmap_pad;        /* padding requirements on bitmaps */
  470.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  471.     int nformats;        /* number of pixmap formats in list */
  472.     ScreenFormat *pixmap_format;    /* pixmap format list */
  473.     int vnumber;        /* Xlib's X protocol version number. */
  474.     int release;        /* release of the server */
  475.     struct _XSQEvent *head, *tail;    /* Input event queue. */
  476.     int qlen;        /* Length of input event queue */
  477.     unsigned long last_request_read; /* seq number of last event read */
  478.     unsigned long request;    /* sequence number of last request. */
  479.     char *last_req;        /* beginning of last request, or dummy */
  480.     char *buffer;        /* Output buffer starting address. */
  481.     char *bufptr;        /* Output buffer index pointer. */
  482.     char *bufmax;        /* Output buffer maximum+1 address. */
  483.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  484.     struct _XrmHashBucketRec *db;
  485.     int (*synchandler)();    /* Synchronization handler */
  486.     char *display_name;    /* "host:display" string used on this connect*/
  487.     int default_screen;    /* default screen for operations */
  488.     int nscreens;        /* number of screens on this server*/
  489.     Screen *screens;    /* pointer to list of screens */
  490.     unsigned long motion_buffer;    /* size of motion buffer */
  491.     unsigned long flags;    /* internal connection flags */
  492.     int min_keycode;    /* minimum defined keycode */
  493.     int max_keycode;    /* maximum defined keycode */
  494.     KeySym *keysyms;    /* This server's keysyms */
  495.     XModifierKeymap *modifiermap;    /* This server's modifier keymap */
  496.     int keysyms_per_keycode;/* number of rows */
  497.     char *xdefaults;    /* contents of defaults from server */
  498.     char *scratch_buffer;    /* place to hang scratch buffer */
  499.     unsigned long scratch_length;    /* length of scratch buffer */
  500.     int ext_number;        /* extension number on this display */
  501.     struct _XExten *ext_procs; /* extensions initialized on this display */
  502.     /*
  503.      * the following can be fixed size, as the protocol defines how
  504.      * much address space is available. 
  505.      * While this could be done using the extension vector, there
  506.      * may be MANY events processed, so a search through the extension
  507.      * list to find the right procedure for each event might be
  508.      * expensive if many extensions are being used.
  509.      */
  510.     Bool (*event_vec[128])();  /* vector for wire to event */
  511.     Status (*wire_vec[128])(); /* vector for event to wire */
  512.     KeySym lock_meaning;       /* for XLookupString */
  513.     struct _XLockInfo *lock;   /* multi-thread state, display lock */
  514.     struct _XInternalAsync *async_handlers; /* for internal async */
  515.     unsigned long bigreq_size; /* max size of big requests */
  516.     struct _XLockPtrs *lock_fns; /* pointers to threads functions */
  517.     /* things above this line should not move, for binary compatibility */
  518.     struct _XKeytrans *key_bindings; /* for XLookupString */
  519.     Font cursor_font;       /* for XCreateFontCursor */
  520.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  521.     unsigned int mode_switch;  /* keyboard group modifiers */
  522.     struct _XContextDB *context_db; /* context database */
  523.     Bool (**error_vec)();      /* vector for wire to error */
  524.     /*
  525.      * Xcms information
  526.      */
  527.     struct {
  528.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  529.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  530.        XPointer perVisualIntensityMaps;
  531.                   /* linked list of XcmsIntensityMap */
  532.     } cms;
  533.     struct _XIMFilter *im_filters;
  534.     struct _XSQEvent *qfree; /* unallocated event queue elements */
  535.     unsigned long next_event_serial_num; /* inserted into next queue elt */
  536.     int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
  537. } Display;
  538.  
  539. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  540. #undef _XEVENT_
  541. #endif
  542. #ifndef _XEVENT_
  543.  
  544. #define XMaxTransChars 4
  545.  
  546. /*
  547.  * Definitions of specific events.
  548.  */
  549. typedef struct {
  550.     int type;        /* of event */
  551.     unsigned long serial;    /* # of last request processed by server */
  552.     Bool send_event;    /* true if this came from a SendEvent request */
  553.     Display *display;    /* Display the event was read from */
  554.     Window window;            /* "event" window it is reported relative to */
  555.     Window root;            /* root window that the event occured on */
  556.     Window subwindow;    /* child window */
  557.     Time time;        /* milliseconds */
  558.     int x, y;        /* pointer x, y coordinates in event window */
  559.     int x_root, y_root;    /* coordinates relative to root */
  560.     unsigned int state;    /* key or button mask */
  561.     unsigned int keycode;    /* detail */
  562.     Bool same_screen;    /* same screen flag */
  563.         char trans_chars[XMaxTransChars];
  564.                 /* translated characters */
  565.     int nchars;
  566. } XKeyEvent;
  567. typedef XKeyEvent XKeyPressedEvent;
  568. typedef XKeyEvent XKeyReleasedEvent;
  569.  
  570. typedef struct {
  571.     int type;        /* of event */
  572.     unsigned long serial;    /* # of last request processed by server */
  573.     Bool send_event;    /* true if this came from a SendEvent request */
  574.     Display *display;    /* Display the event was read from */
  575.     Window window;            /* "event" window it is reported relative to */
  576.     Window root;            /* root window that the event occured on */
  577.     Window subwindow;    /* child window */
  578.     Time time;        /* milliseconds */
  579.     int x, y;        /* pointer x, y coordinates in event window */
  580.     int x_root, y_root;    /* coordinates relative to root */
  581.     unsigned int state;    /* key or button mask */
  582.     unsigned int button;    /* detail */
  583.     Bool same_screen;    /* same screen flag */
  584. } XButtonEvent;
  585. typedef XButtonEvent XButtonPressedEvent;
  586. typedef XButtonEvent XButtonReleasedEvent;
  587.  
  588. typedef struct {
  589.     int type;        /* of event */
  590.     unsigned long serial;    /* # of last request processed by server */
  591.     Bool send_event;    /* true if this came from a SendEvent request */
  592.     Display *display;    /* Display the event was read from */
  593.     Window window;            /* "event" window reported relative to */
  594.     Window root;            /* root window that the event occured on */
  595.     Window subwindow;    /* child window */
  596.     Time time;        /* milliseconds */
  597.     int x, y;        /* pointer x, y coordinates in event window */
  598.     int x_root, y_root;    /* coordinates relative to root */
  599.     unsigned int state;    /* key or button mask */
  600.     char is_hint;        /* detail */
  601.     Bool same_screen;    /* same screen flag */
  602. } XMotionEvent;
  603. typedef XMotionEvent XPointerMovedEvent;
  604.  
  605. typedef struct {
  606.     int type;        /* of event */
  607.     unsigned long serial;    /* # of last request processed by server */
  608.     Bool send_event;    /* true if this came from a SendEvent request */
  609.     Display *display;    /* Display the event was read from */
  610.     Window window;            /* "event" window reported relative to */
  611.     Window root;            /* root window that the event occured on */
  612.     Window subwindow;    /* child window */
  613.     Time time;        /* milliseconds */
  614.     int x, y;        /* pointer x, y coordinates in event window */
  615.     int x_root, y_root;    /* coordinates relative to root */
  616.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  617.     int detail;
  618.     /*
  619.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  620.      * NotifyNonlinear,NotifyNonlinearVirtual
  621.      */
  622.     Bool same_screen;    /* same screen flag */
  623.     Bool focus;        /* boolean focus */
  624.     unsigned int state;    /* key or button mask */
  625. } XCrossingEvent;
  626. typedef XCrossingEvent XEnterWindowEvent;
  627. typedef XCrossingEvent XLeaveWindowEvent;
  628.  
  629. typedef struct {
  630.     int type;        /* FocusIn or FocusOut */
  631.     unsigned long serial;    /* # of last request processed by server */
  632.     Bool send_event;    /* true if this came from a SendEvent request */
  633.     Display *display;    /* Display the event was read from */
  634.     Window window;        /* window of event */
  635.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  636.     int detail;
  637.     /*
  638.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  639.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  640.      * NotifyPointerRoot, NotifyDetailNone 
  641.      */
  642. } XFocusChangeEvent;
  643. typedef XFocusChangeEvent XFocusInEvent;
  644. typedef XFocusChangeEvent XFocusOutEvent;
  645.  
  646. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  647. typedef struct {
  648.     int type;
  649.     unsigned long serial;    /* # of last request processed by server */
  650.     Bool send_event;    /* true if this came from a SendEvent request */
  651.     Display *display;    /* Display the event was read from */
  652.     Window window;
  653.     char key_vector[32];
  654. } XKeymapEvent;    
  655.  
  656. typedef struct {
  657.     int type;
  658.     unsigned long serial;    /* # of last request processed by server */
  659.     Bool send_event;    /* true if this came from a SendEvent request */
  660.     Display *display;    /* Display the event was read from */
  661.     Window window;
  662.     int x, y;
  663.     int width, height;
  664.     int count;        /* if non-zero, at least this many more */
  665. } XExposeEvent;
  666.  
  667. typedef struct {
  668.     int type;
  669.     unsigned long serial;    /* # of last request processed by server */
  670.     Bool send_event;    /* true if this came from a SendEvent request */
  671.     Display *display;    /* Display the event was read from */
  672.     Drawable drawable;
  673.     int x, y;
  674.     int width, height;
  675.     int count;        /* if non-zero, at least this many more */
  676.     int major_code;        /* core is CopyArea or CopyPlane */
  677.     int minor_code;        /* not defined in the core */
  678. } XGraphicsExposeEvent;
  679.  
  680. typedef struct {
  681.     int type;
  682.     unsigned long serial;    /* # of last request processed by server */
  683.     Bool send_event;    /* true if this came from a SendEvent request */
  684.     Display *display;    /* Display the event was read from */
  685.     Drawable drawable;
  686.     int major_code;        /* core is CopyArea or CopyPlane */
  687.     int minor_code;        /* not defined in the core */
  688. } XNoExposeEvent;
  689.  
  690. typedef struct {
  691.     int type;
  692.     unsigned long serial;    /* # of last request processed by server */
  693.     Bool send_event;    /* true if this came from a SendEvent request */
  694.     Display *display;    /* Display the event was read from */
  695.     Window window;
  696.     int state;        /* Visibility state */
  697. } XVisibilityEvent;
  698.  
  699. typedef struct {
  700.     int type;
  701.     unsigned long serial;    /* # of last request processed by server */
  702.     Bool send_event;    /* true if this came from a SendEvent request */
  703.     Display *display;    /* Display the event was read from */
  704.     Window parent;        /* parent of the window */
  705.     Window window;        /* window id of window created */
  706.     int x, y;        /* window location */
  707.     int width, height;    /* size of window */
  708.     int border_width;    /* border width */
  709.     Bool override_redirect;    /* creation should be overridden */
  710. } XCreateWindowEvent;
  711.  
  712. typedef struct {
  713.     int type;
  714.     unsigned long serial;    /* # of last request processed by server */
  715.     Bool send_event;    /* true if this came from a SendEvent request */
  716.     Display *display;    /* Display the event was read from */
  717.     Window event;
  718.     Window window;
  719. } XDestroyWindowEvent;
  720.  
  721. typedef struct {
  722.     int type;
  723.     unsigned long serial;    /* # of last request processed by server */
  724.     Bool send_event;    /* true if this came from a SendEvent request */
  725.     Display *display;    /* Display the event was read from */
  726.     Window event;
  727.     Window window;
  728.     Bool from_configure;
  729. } XUnmapEvent;
  730.  
  731. typedef struct {
  732.     int type;
  733.     unsigned long serial;    /* # of last request processed by server */
  734.     Bool send_event;    /* true if this came from a SendEvent request */
  735.     Display *display;    /* Display the event was read from */
  736.     Window event;
  737.     Window window;
  738.     Bool override_redirect;    /* boolean, is override set... */
  739. } XMapEvent;
  740.  
  741. typedef struct {
  742.     int type;
  743.     unsigned long serial;    /* # of last request processed by server */
  744.     Bool send_event;    /* true if this came from a SendEvent request */
  745.     Display *display;    /* Display the event was read from */
  746.     Window parent;
  747.     Window window;
  748. } XMapRequestEvent;
  749.  
  750. typedef struct {
  751.     int type;
  752.     unsigned long serial;    /* # of last request processed by server */
  753.     Bool send_event;    /* true if this came from a SendEvent request */
  754.     Display *display;    /* Display the event was read from */
  755.     Window event;
  756.     Window window;
  757.     Window parent;
  758.     int x, y;
  759.     Bool override_redirect;
  760. } XReparentEvent;
  761.  
  762. typedef struct {
  763.     int type;
  764.     unsigned long serial;    /* # of last request processed by server */
  765.     Bool send_event;    /* true if this came from a SendEvent request */
  766.     Display *display;    /* Display the event was read from */
  767.     Window event;
  768.     Window window;
  769.     int x, y;
  770.     int width, height;
  771.     int border_width;
  772.     Window above;
  773.     Bool override_redirect;
  774. } XConfigureEvent;
  775.  
  776. typedef struct {
  777.     int type;
  778.     unsigned long serial;    /* # of last request processed by server */
  779.     Bool send_event;    /* true if this came from a SendEvent request */
  780.     Display *display;    /* Display the event was read from */
  781.     Window event;
  782.     Window window;
  783.     int x, y;
  784. } XGravityEvent;
  785.  
  786. typedef struct {
  787.     int type;
  788.     unsigned long serial;    /* # of last request processed by server */
  789.     Bool send_event;    /* true if this came from a SendEvent request */
  790.     Display *display;    /* Display the event was read from */
  791.     Window window;
  792.     int width, height;
  793. } XResizeRequestEvent;
  794.  
  795. typedef struct {
  796.     int type;
  797.     unsigned long serial;    /* # of last request processed by server */
  798.     Bool send_event;    /* true if this came from a SendEvent request */
  799.     Display *display;    /* Display the event was read from */
  800.     Window parent;
  801.     Window window;
  802.     int x, y;
  803.     int width, height;
  804.     int border_width;
  805.     Window above;
  806.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  807.     unsigned long value_mask;
  808. } XConfigureRequestEvent;
  809.  
  810. typedef struct {
  811.     int type;
  812.     unsigned long serial;    /* # of last request processed by server */
  813.     Bool send_event;    /* true if this came from a SendEvent request */
  814.     Display *display;    /* Display the event was read from */
  815.     Window event;
  816.     Window window;
  817.     int place;        /* PlaceOnTop, PlaceOnBottom */
  818. } XCirculateEvent;
  819.  
  820. typedef struct {
  821.     int type;
  822.     unsigned long serial;    /* # of last request processed by server */
  823.     Bool send_event;    /* true if this came from a SendEvent request */
  824.     Display *display;    /* Display the event was read from */
  825.     Window parent;
  826.     Window window;
  827.     int place;        /* PlaceOnTop, PlaceOnBottom */
  828. } XCirculateRequestEvent;
  829.  
  830. typedef struct {
  831.     int type;
  832.     unsigned long serial;    /* # of last request processed by server */
  833.     Bool send_event;    /* true if this came from a SendEvent request */
  834.     Display *display;    /* Display the event was read from */
  835.     Window window;
  836.     Atom atom;
  837.     Time time;
  838.     int state;        /* NewValue, Deleted */
  839. } XPropertyEvent;
  840.  
  841. typedef struct {
  842.     int type;
  843.     unsigned long serial;    /* # of last request processed by server */
  844.     Bool send_event;    /* true if this came from a SendEvent request */
  845.     Display *display;    /* Display the event was read from */
  846.     Window window;
  847.     Atom selection;
  848.     Time time;
  849. } XSelectionClearEvent;
  850.  
  851. typedef struct {
  852.     int type;
  853.     unsigned long serial;    /* # of last request processed by server */
  854.     Bool send_event;    /* true if this came from a SendEvent request */
  855.     Display *display;    /* Display the event was read from */
  856.     Window owner;
  857.     Window requestor;
  858.     Atom selection;
  859.     Atom target;
  860.     Atom property;
  861.     Time time;
  862. } XSelectionRequestEvent;
  863.  
  864. typedef struct {
  865.     int type;
  866.     unsigned long serial;    /* # of last request processed by server */
  867.     Bool send_event;    /* true if this came from a SendEvent request */
  868.     Display *display;    /* Display the event was read from */
  869.     Window requestor;
  870.     Atom selection;
  871.     Atom target;
  872.     Atom property;        /* ATOM or None */
  873.     Time time;
  874. } XSelectionEvent;
  875.  
  876. typedef struct {
  877.     int type;
  878.     unsigned long serial;    /* # of last request processed by server */
  879.     Bool send_event;    /* true if this came from a SendEvent request */
  880.     Display *display;    /* Display the event was read from */
  881.     Window window;
  882.     Colormap colormap;    /* COLORMAP or None */
  883. #if defined(__cplusplus) || defined(c_plusplus)
  884.     Bool c_new;        /* C++ */
  885. #else
  886.     Bool new;
  887. #endif
  888.     int state;        /* ColormapInstalled, ColormapUninstalled */
  889. } XColormapEvent;
  890.  
  891. typedef struct {
  892.     int type;
  893.     unsigned long serial;    /* # of last request processed by server */
  894.     Bool send_event;    /* true if this came from a SendEvent request */
  895.     Display *display;    /* Display the event was read from */
  896.     Window window;
  897.     Atom message_type;
  898.     int format;
  899.     union {
  900.         char b[20];
  901.         short s[10];
  902.         long l[5];
  903.         } data;
  904. } XClientMessageEvent;
  905.  
  906. typedef struct {
  907.     int type;
  908.     unsigned long serial;    /* # of last request processed by server */
  909.     Bool send_event;    /* true if this came from a SendEvent request */
  910.     Display *display;    /* Display the event was read from */
  911.     Window window;        /* unused */
  912.     int request;        /* one of MappingModifier, MappingKeyboard,
  913.                    MappingPointer */
  914.     int first_keycode;    /* first keycode */
  915.     int count;        /* defines range of change w. first_keycode*/
  916. } XMappingEvent;
  917.  
  918. typedef struct {
  919.     int type;
  920.     Display *display;    /* Display the event was read from */
  921.     XID resourceid;        /* resource id */
  922.     unsigned long serial;    /* serial number of failed request */
  923.     unsigned char error_code;    /* error code of failed request */
  924.     unsigned char request_code;    /* Major op-code of failed request */
  925.     unsigned char minor_code;    /* Minor op-code of failed request */
  926. } XErrorEvent;
  927.  
  928. typedef struct {
  929.     int type;
  930.     unsigned long serial;    /* # of last request processed by server */
  931.     Bool send_event;    /* true if this came from a SendEvent request */
  932.     Display *display;/* Display the event was read from */
  933.     Window window;    /* window on which event was requested in event mask */
  934. } XAnyEvent;
  935.  
  936. /*
  937.  * this union is defined so Xlib can always use the same sized
  938.  * event structure internally, to avoid memory fragmentation.
  939.  */
  940. typedef union _XEvent {
  941.         int type;        /* must not be changed; first element */
  942.     XAnyEvent xany;
  943.     XKeyEvent xkey;
  944.     XButtonEvent xbutton;
  945.     XMotionEvent xmotion;
  946.     XCrossingEvent xcrossing;
  947.     XFocusChangeEvent xfocus;
  948.     XExposeEvent xexpose;
  949.     XGraphicsExposeEvent xgraphicsexpose;
  950.     XNoExposeEvent xnoexpose;
  951.     XVisibilityEvent xvisibility;
  952.     XCreateWindowEvent xcreatewindow;
  953.     XDestroyWindowEvent xdestroywindow;
  954.     XUnmapEvent xunmap;
  955.     XMapEvent xmap;
  956.     XMapRequestEvent xmaprequest;
  957.     XReparentEvent xreparent;
  958.     XConfigureEvent xconfigure;
  959.     XGravityEvent xgravity;
  960.     XResizeRequestEvent xresizerequest;
  961.     XConfigureRequestEvent xconfigurerequest;
  962.     XCirculateEvent xcirculate;
  963.     XCirculateRequestEvent xcirculaterequest;
  964.     XPropertyEvent xproperty;
  965.     XSelectionClearEvent xselectionclear;
  966.     XSelectionRequestEvent xselectionrequest;
  967.     XSelectionEvent xselection;
  968.     XColormapEvent xcolormap;
  969.     XClientMessageEvent xclient;
  970.     XMappingEvent xmapping;
  971.     XErrorEvent xerror;
  972.     XKeymapEvent xkeymap;
  973.     long pad[24];
  974. } XEvent;
  975. #endif
  976.  
  977. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  978.  
  979. /*
  980.  * per character font metric information.
  981.  */
  982. typedef struct {
  983.     short    lbearing;    /* origin to left edge of raster */
  984.     short    rbearing;    /* origin to right edge of raster */
  985.     short    width;        /* advance to next char's origin */
  986.     short    ascent;        /* baseline to top edge of raster */
  987.     short    descent;    /* baseline to bottom edge of raster */
  988.     unsigned short attributes;    /* per char flags (not predefined) */
  989. } XCharStruct;
  990.  
  991. /*
  992.  * To allow arbitrary information with fonts, there are additional properties
  993.  * returned.
  994.  */
  995. typedef struct {
  996.     Atom name;
  997.     unsigned long card32;
  998. } XFontProp;
  999.  
  1000. typedef struct {
  1001.     XExtData    *ext_data;    /* hook for extension to hang data */
  1002.     Font        fid;            /* Font id for this font */
  1003.     unsigned    direction;    /* hint about direction the font is painted */
  1004.     unsigned    min_char_or_byte2;/* first character */
  1005.     unsigned    max_char_or_byte2;/* last character */
  1006.     unsigned    min_byte1;    /* first row that exists */
  1007.     unsigned    max_byte1;    /* last row that exists */
  1008.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  1009.     unsigned    default_char;    /* char to print for undefined character */
  1010.     int         n_properties;   /* how many properties there are */
  1011.     XFontProp    *properties;    /* pointer to array of additional properties*/
  1012.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  1013.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  1014.     XCharStruct    *per_char;    /* first_char to last_char information */
  1015.     int        ascent;        /* log. extent above baseline for spacing */
  1016.     int        descent;    /* log. descent below baseline for spacing */
  1017. } XFontStruct;
  1018.  
  1019. /*
  1020.  * PolyText routines take these as arguments.
  1021.  */
  1022. typedef struct {
  1023.     char *chars;        /* pointer to string */
  1024.     int nchars;            /* number of characters */
  1025.     int delta;            /* delta between strings */
  1026.     Font font;            /* font to print it in, None don't change */
  1027. } XTextItem;
  1028.  
  1029. typedef struct {        /* normal 16 bit characters are two bytes */
  1030.     unsigned char byte1;
  1031.     unsigned char byte2;
  1032. } XChar2b;
  1033.  
  1034. typedef struct {
  1035.     XChar2b *chars;        /* two byte characters */
  1036.     int nchars;            /* number of characters */
  1037.     int delta;            /* delta between strings */
  1038.     Font font;            /* font to print it in, None don't change */
  1039. } XTextItem16;
  1040.  
  1041.  
  1042. typedef union { Display *display;
  1043.         GC gc;
  1044.         Visual *visual;
  1045.         Screen *screen;
  1046.         ScreenFormat *pixmap_format;
  1047.         XFontStruct *font; } XEDataObject;
  1048.  
  1049. typedef struct {
  1050.     XRectangle      max_ink_extent;
  1051.     XRectangle      max_logical_extent;
  1052. } XFontSetExtents;
  1053.  
  1054. typedef struct _XFontSet *XFontSet;
  1055.  
  1056. typedef struct {
  1057.     char           *chars;
  1058.     int             nchars;
  1059.     int             delta;
  1060.     XFontSet        font_set;
  1061. } XmbTextItem;
  1062.  
  1063. typedef struct {
  1064.     wchar_t        *chars;
  1065.     int             nchars;
  1066.     int             delta;
  1067.     XFontSet        font_set;
  1068. } XwcTextItem;
  1069.  
  1070. typedef void (*XIMProc)();
  1071.  
  1072. typedef struct _XIM *XIM;
  1073. typedef struct _XIC *XIC;
  1074.  
  1075. typedef unsigned long XIMStyle;
  1076.  
  1077. typedef struct {
  1078.     unsigned short count_styles;
  1079.     XIMStyle *supported_styles;
  1080. } XIMStyles;
  1081.  
  1082. #define XIMPreeditArea        0x0001L
  1083. #define XIMPreeditCallbacks    0x0002L
  1084. #define XIMPreeditPosition    0x0004L
  1085. #define XIMPreeditNothing    0x0008L
  1086. #define XIMPreeditNone        0x0010L
  1087. #define XIMStatusArea        0x0100L
  1088. #define XIMStatusCallbacks    0x0200L
  1089. #define XIMStatusNothing    0x0400L
  1090. #define XIMStatusNone        0x0800L
  1091.  
  1092. #define XNVaNestedList "XNVaNestedList"
  1093. #define XNClientWindow "clientWindow"
  1094. #define XNInputStyle "inputStyle"
  1095. #define XNFocusWindow "focusWindow"
  1096. #define XNResourceName "resourceName"
  1097. #define XNResourceClass "resourceClass"
  1098. #define XNGeometryCallback "geometryCallback"
  1099. #define XNFilterEvents "filterEvents"
  1100. #define XNPreeditStartCallback "preeditStartCallback"
  1101. #define XNPreeditDoneCallback "preeditDoneCallback"
  1102. #define XNPreeditDrawCallback "preeditDrawCallback"
  1103. #define XNPreeditCaretCallback "preeditCaretCallback"
  1104. #define XNPreeditAttributes "preeditAttributes"
  1105. #define XNStatusStartCallback "statusStartCallback"
  1106. #define XNStatusDoneCallback "statusDoneCallback"
  1107. #define XNStatusDrawCallback "statusDrawCallback"
  1108. #define XNStatusAttributes "statusAttributes"
  1109. #define XNArea "area"
  1110. #define XNAreaNeeded "areaNeeded"
  1111. #define XNSpotLocation "spotLocation"
  1112. #define XNColormap "colorMap"
  1113. #define XNStdColormap "stdColorMap"
  1114. #define XNForeground "foreground"
  1115. #define XNBackground "background"
  1116. #define XNBackgroundPixmap "backgroundPixmap"
  1117. #define XNFontSet "fontSet"
  1118. #define XNLineSpace "lineSpace"
  1119. #define XNCursor "cursor"
  1120.  
  1121. #define XBufferOverflow        -1
  1122. #define XLookupNone        1
  1123. #define XLookupChars        2
  1124. #define XLookupKeySym        3
  1125. #define XLookupBoth        4
  1126.  
  1127. #if NeedFunctionPrototypes
  1128. typedef void *XVaNestedList;
  1129. #else
  1130. typedef XPointer XVaNestedList;
  1131. #endif
  1132.  
  1133. typedef struct {
  1134.     XPointer client_data;
  1135.     XIMProc callback;
  1136. } XIMCallback;
  1137.  
  1138. typedef unsigned long XIMFeedback;
  1139.  
  1140. #define XIMReverse    1
  1141. #define XIMUnderline    (1<<1) 
  1142. #define XIMHighlight    (1<<2)
  1143. #define XIMPrimary     (1<<5)
  1144. #define XIMSecondary    (1<<6)
  1145. #define XIMTertiary     (1<<7)
  1146.  
  1147. typedef struct _XIMText {
  1148.     unsigned short length;
  1149.     XIMFeedback *feedback;
  1150.     Bool encoding_is_wchar; 
  1151.     union {
  1152.     char *multi_byte;
  1153.     wchar_t *wide_char;
  1154.     } string; 
  1155. } XIMText;
  1156.  
  1157. typedef struct _XIMPreeditDrawCallbackStruct {
  1158.     int caret;        /* Cursor offset within pre-edit string */
  1159.     int chg_first;    /* Starting change position */
  1160.     int chg_length;    /* Length of the change in character count */
  1161.     XIMText *text;
  1162. } XIMPreeditDrawCallbackStruct;
  1163.  
  1164. typedef enum {
  1165.     XIMForwardChar, XIMBackwardChar,
  1166.     XIMForwardWord, XIMBackwardWord,
  1167.     XIMCaretUp, XIMCaretDown,
  1168.     XIMNextLine, XIMPreviousLine,
  1169.     XIMLineStart, XIMLineEnd, 
  1170.     XIMAbsolutePosition,
  1171.     XIMDontChange
  1172. } XIMCaretDirection;
  1173.  
  1174. typedef enum {
  1175.     XIMIsInvisible,    /* Disable caret feedback */ 
  1176.     XIMIsPrimary,    /* UI defined caret feedback */
  1177.     XIMIsSecondary    /* UI defined caret feedback */
  1178. } XIMCaretStyle;
  1179.  
  1180. typedef struct _XIMPreeditCaretCallbackStruct {
  1181.     int position;         /* Caret offset within pre-edit string */
  1182.     XIMCaretDirection direction; /* Caret moves direction */
  1183.     XIMCaretStyle style;     /* Feedback of the caret */
  1184. } XIMPreeditCaretCallbackStruct;
  1185.  
  1186. typedef enum {
  1187.     XIMTextType,
  1188.     XIMBitmapType
  1189. } XIMStatusDataType;
  1190.     
  1191. typedef struct _XIMStatusDrawCallbackStruct {
  1192.     XIMStatusDataType type;
  1193.     union {
  1194.     XIMText *text;
  1195.     Pixmap  bitmap;
  1196.     } data;
  1197. } XIMStatusDrawCallbackStruct;
  1198.  
  1199. _XFUNCPROTOBEGIN
  1200.  
  1201. extern XFontStruct *XLoadQueryFont(
  1202. #if NeedFunctionPrototypes
  1203.     Display*        /* display */,
  1204.     _Xconst char*    /* name */
  1205. #endif
  1206. );
  1207.  
  1208. extern XFontStruct *XQueryFont(
  1209. #if NeedFunctionPrototypes
  1210.     Display*        /* display */,
  1211.     XID            /* font_ID */
  1212. #endif
  1213. );
  1214.  
  1215.  
  1216. extern XTimeCoord *XGetMotionEvents(
  1217. #if NeedFunctionPrototypes
  1218.     Display*        /* display */,
  1219.     Window        /* w */,
  1220.     Time        /* start */,
  1221.     Time        /* stop */,
  1222.     int*        /* nevents_return */
  1223. #endif
  1224. );
  1225.  
  1226. extern XModifierKeymap *XDeleteModifiermapEntry(
  1227. #if NeedFunctionPrototypes
  1228.     XModifierKeymap*    /* modmap */,
  1229. #if NeedWidePrototypes
  1230.     unsigned int    /* keycode_entry */,
  1231. #else
  1232.     KeyCode        /* keycode_entry */,
  1233. #endif
  1234.     int            /* modifier */
  1235. #endif
  1236. );
  1237.  
  1238. extern XModifierKeymap    *XGetModifierMapping(
  1239. #if NeedFunctionPrototypes
  1240.     Display*        /* display */
  1241. #endif
  1242. );
  1243.  
  1244. extern XModifierKeymap    *XInsertModifiermapEntry(
  1245. #if NeedFunctionPrototypes
  1246.     XModifierKeymap*    /* modmap */,
  1247. #if NeedWidePrototypes
  1248.     unsigned int    /* keycode_entry */,
  1249. #else
  1250.     KeyCode        /* keycode_entry */,
  1251. #endif
  1252.     int            /* modifier */    
  1253. #endif
  1254. );
  1255.  
  1256. extern XModifierKeymap *XNewModifiermap(
  1257. #if NeedFunctionPrototypes
  1258.     int            /* max_keys_per_mod */
  1259. #endif
  1260. );
  1261.  
  1262. extern XImage *XCreateImage(
  1263. #if NeedFunctionPrototypes
  1264.     Display*        /* display */,
  1265.     Visual*        /* visual */,
  1266.     unsigned int    /* depth */,
  1267.     int            /* format */,
  1268.     int            /* offset */,
  1269.     char*        /* data */,
  1270.     unsigned int    /* width */,
  1271.     unsigned int    /* height */,
  1272.     int            /* bitmap_pad */,
  1273.     int            /* bytes_per_line */
  1274. #endif
  1275. );
  1276. extern XImage *XGetImage(
  1277. #if NeedFunctionPrototypes
  1278.     Display*        /* display */,
  1279.     Drawable        /* d */,
  1280.     int            /* x */,
  1281.     int            /* y */,
  1282.     unsigned int    /* width */,
  1283.     unsigned int    /* height */,
  1284.     unsigned long    /* plane_mask */,
  1285.     int            /* format */
  1286. #endif
  1287. );
  1288. extern XImage *XGetSubImage(
  1289. #if NeedFunctionPrototypes
  1290.     Display*        /* display */,
  1291.     Drawable        /* d */,
  1292.     int            /* x */,
  1293.     int            /* y */,
  1294.     unsigned int    /* width */,
  1295.     unsigned int    /* height */,
  1296.     unsigned long    /* plane_mask */,
  1297.     int            /* format */,
  1298.     XImage*        /* dest_image */,
  1299.     int            /* dest_x */,
  1300.     int            /* dest_y */
  1301. #endif
  1302. );
  1303.  
  1304. /* 
  1305.  * X function declarations.
  1306.  */
  1307. extern Display *XOpenDisplay(
  1308. #if NeedFunctionPrototypes
  1309.     _Xconst char*    /* display_name */
  1310. #endif
  1311. );
  1312.  
  1313. extern void XrmInitialize(
  1314. #if NeedFunctionPrototypes
  1315.     void
  1316. #endif
  1317. );
  1318.  
  1319. extern char *XFetchBytes(
  1320. #if NeedFunctionPrototypes
  1321.     Display*        /* display */,
  1322.     int*        /* nbytes_return */
  1323. #endif
  1324. );
  1325. extern char *XFetchBuffer(
  1326. #if NeedFunctionPrototypes
  1327.     Display*        /* display */,
  1328.     int*        /* nbytes_return */,
  1329.     int            /* buffer */
  1330. #endif
  1331. );
  1332. extern char *XGetAtomName(
  1333. #if NeedFunctionPrototypes
  1334.     Display*        /* display */,
  1335.     Atom        /* atom */
  1336. #endif
  1337. );
  1338. extern char *XGetDefault(
  1339. #if NeedFunctionPrototypes
  1340.     Display*        /* display */,
  1341.     _Xconst char*    /* program */,
  1342.     _Xconst char*    /* option */          
  1343. #endif
  1344. );
  1345. extern char *XDisplayName(
  1346. #if NeedFunctionPrototypes
  1347.     _Xconst char*    /* string */
  1348. #endif
  1349. );
  1350. extern char *XKeysymToString(
  1351. #if NeedFunctionPrototypes
  1352.     KeySym        /* keysym */
  1353. #endif
  1354. );
  1355.  
  1356. extern int (*XSynchronize(
  1357. #if NeedFunctionPrototypes
  1358.     Display*        /* display */,
  1359.     Bool        /* onoff */
  1360. #endif
  1361. ))();
  1362. extern int (*XSetAfterFunction(
  1363. #if NeedFunctionPrototypes
  1364.     Display*        /* display */,
  1365.     int (*) (
  1366. #if NeedNestedPrototypes
  1367.          Display*    /* display */
  1368. #endif
  1369.             )        /* procedure */
  1370. #endif
  1371. ))();
  1372. extern Atom XInternAtom(
  1373. #if NeedFunctionPrototypes
  1374.     Display*        /* display */,
  1375.     _Xconst char*    /* atom_name */,
  1376.     Bool        /* only_if_exists */         
  1377. #endif
  1378. );
  1379. extern Colormap XCopyColormapAndFree(
  1380. #if NeedFunctionPrototypes
  1381.     Display*        /* display */,
  1382.     Colormap        /* colormap */
  1383. #endif
  1384. );
  1385. extern Colormap XCreateColormap(
  1386. #if NeedFunctionPrototypes
  1387.     Display*        /* display */,
  1388.     Window        /* w */,
  1389.     Visual*        /* visual */,
  1390.     int            /* alloc */             
  1391. #endif
  1392. );
  1393. extern Cursor XCreatePixmapCursor(
  1394. #if NeedFunctionPrototypes
  1395.     Display*        /* display */,
  1396.     Pixmap        /* source */,
  1397.     Pixmap        /* mask */,
  1398.     XColor*        /* foreground_color */,
  1399.     XColor*        /* background_color */,
  1400.     unsigned int    /* x */,
  1401.     unsigned int    /* y */               
  1402. #endif
  1403. );
  1404. extern Cursor XCreateGlyphCursor(
  1405. #if NeedFunctionPrototypes
  1406.     Display*        /* display */,
  1407.     Font        /* source_font */,
  1408.     Font        /* mask_font */,
  1409.     unsigned int    /* source_char */,
  1410.     unsigned int    /* mask_char */,
  1411.     XColor*        /* foreground_color */,
  1412.     XColor*        /* background_color */
  1413. #endif
  1414. );
  1415. extern Cursor XCreateFontCursor(
  1416. #if NeedFunctionPrototypes
  1417.     Display*        /* display */,
  1418.     unsigned int    /* shape */
  1419. #endif
  1420. );
  1421. extern Font XLoadFont(
  1422. #if NeedFunctionPrototypes
  1423.     Display*        /* display */,
  1424.     _Xconst char*    /* name */
  1425. #endif
  1426. );
  1427. extern GC XCreateGC(
  1428. #if NeedFunctionPrototypes
  1429.     Display*        /* display */,
  1430.     Drawable        /* d */,
  1431.     unsigned long    /* valuemask */,
  1432.     XGCValues*        /* values */
  1433. #endif
  1434. );
  1435. extern GContext XGContextFromGC(
  1436. #if NeedFunctionPrototypes
  1437.     GC            /* gc */
  1438. #endif
  1439. );
  1440. extern void XFlushGC(
  1441. #if NeedFunctionPrototypes
  1442.     Display*        /* display */,
  1443.     GC            /* gc */
  1444. #endif
  1445. );
  1446. extern Pixmap XCreatePixmap(
  1447. #if NeedFunctionPrototypes
  1448.     Display*        /* display */,
  1449.     Drawable        /* d */,
  1450.     unsigned int    /* width */,
  1451.     unsigned int    /* height */,
  1452.     unsigned int    /* depth */                
  1453. #endif
  1454. );
  1455. extern Pixmap XCreateBitmapFromData(
  1456. #if NeedFunctionPrototypes
  1457.     Display*        /* display */,
  1458.     Drawable        /* d */,
  1459.     _Xconst char*    /* data */,
  1460.     unsigned int    /* width */,
  1461.     unsigned int    /* height */
  1462. #endif
  1463. );
  1464. extern Pixmap XCreatePixmapFromBitmapData(
  1465. #if NeedFunctionPrototypes
  1466.     Display*        /* display */,
  1467.     Drawable        /* d */,
  1468.     char*        /* data */,
  1469.     unsigned int    /* width */,
  1470.     unsigned int    /* height */,
  1471.     unsigned long    /* fg */,
  1472.     unsigned long    /* bg */,
  1473.     unsigned int    /* depth */
  1474. #endif
  1475. );
  1476. extern Window XCreateSimpleWindow(
  1477. #if NeedFunctionPrototypes
  1478.     Display*        /* display */,
  1479.     Window        /* parent */,
  1480.     int            /* x */,
  1481.     int            /* y */,
  1482.     unsigned int    /* width */,
  1483.     unsigned int    /* height */,
  1484.     unsigned int    /* border_width */,
  1485.     unsigned long    /* border */,
  1486.     unsigned long    /* background */
  1487. #endif
  1488. );
  1489. extern Window XGetSelectionOwner(
  1490. #if NeedFunctionPrototypes
  1491.     Display*        /* display */,
  1492.     Atom        /* selection */
  1493. #endif
  1494. );
  1495. extern Window XCreateWindow(
  1496. #if NeedFunctionPrototypes
  1497.     Display*        /* display */,
  1498.     Window        /* parent */,
  1499.     int            /* x */,
  1500.     int            /* y */,
  1501.     unsigned int    /* width */,
  1502.     unsigned int    /* height */,
  1503.     unsigned int    /* border_width */,
  1504.     int            /* depth */,
  1505.     unsigned int    /* class */,
  1506.     Visual*        /* visual */,
  1507.     unsigned long    /* valuemask */,
  1508.     XSetWindowAttributes*    /* attributes */
  1509. #endif
  1510. ); 
  1511. extern Colormap *XListInstalledColormaps(
  1512. #if NeedFunctionPrototypes
  1513.     Display*        /* display */,
  1514.     Window        /* w */,
  1515.     int*        /* num_return */
  1516. #endif
  1517. );
  1518. extern char **XListFonts(
  1519. #if NeedFunctionPrototypes
  1520.     Display*        /* display */,
  1521.     _Xconst char*    /* pattern */,
  1522.     int            /* maxnames */,
  1523.     int*        /* actual_count_return */
  1524. #endif
  1525. );
  1526. extern char **XListFontsWithInfo(
  1527. #if NeedFunctionPrototypes
  1528.     Display*        /* display */,
  1529.     _Xconst char*    /* pattern */,
  1530.     int            /* maxnames */,
  1531.     int*        /* count_return */,
  1532.     XFontStruct**    /* info_return */
  1533. #endif
  1534. );
  1535. extern char **XGetFontPath(
  1536. #if NeedFunctionPrototypes
  1537.     Display*        /* display */,
  1538.     int*        /* npaths_return */
  1539. #endif
  1540. );
  1541. extern char **XListExtensions(
  1542. #if NeedFunctionPrototypes
  1543.     Display*        /* display */,
  1544.     int*        /* nextensions_return */
  1545. #endif
  1546. );
  1547. extern Atom *XListProperties(
  1548. #if NeedFunctionPrototypes
  1549.     Display*        /* display */,
  1550.     Window        /* w */,
  1551.     int*        /* num_prop_return */
  1552. #endif
  1553. );
  1554. extern XHostAddress *XListHosts(
  1555. #if NeedFunctionPrototypes
  1556.     Display*        /* display */,
  1557.     int*        /* nhosts_return */,
  1558.     Bool*        /* state_return */
  1559. #endif
  1560. );
  1561. extern KeySym XKeycodeToKeysym(
  1562. #if NeedFunctionPrototypes
  1563.     Display*        /* display */,
  1564. #if NeedWidePrototypes
  1565.     unsigned int    /* keycode */,
  1566. #else
  1567.     KeyCode        /* keycode */,
  1568. #endif
  1569.     int            /* index */
  1570. #endif
  1571. );
  1572. extern KeySym XLookupKeysym(
  1573. #if NeedFunctionPrototypes
  1574.     XKeyEvent*        /* key_event */,
  1575.     int            /* index */
  1576. #endif
  1577. );
  1578. extern KeySym *XGetKeyboardMapping(
  1579. #if NeedFunctionPrototypes
  1580.     Display*        /* display */,
  1581. #if NeedWidePrototypes
  1582.     unsigned int    /* first_keycode */,
  1583. #else
  1584.     KeyCode        /* first_keycode */,
  1585. #endif
  1586.     int            /* keycode_count */,
  1587.     int*        /* keysyms_per_keycode_return */
  1588. #endif
  1589. );
  1590. extern KeySym XStringToKeysym(
  1591. #if NeedFunctionPrototypes
  1592.     _Xconst char*    /* string */
  1593. #endif
  1594. );
  1595. extern long XMaxRequestSize(
  1596. #if NeedFunctionPrototypes
  1597.     Display*        /* display */
  1598. #endif
  1599. );
  1600. extern long XExtendedMaxRequestSize(
  1601. #if NeedFunctionPrototypes
  1602.     Display*        /* display */
  1603. #endif
  1604. );
  1605. extern char *XResourceManagerString(
  1606. #if NeedFunctionPrototypes
  1607.     Display*        /* display */
  1608. #endif
  1609. );
  1610. extern char *XScreenResourceString(
  1611. #if NeedFunctionPrototypes
  1612.     Screen*        /* screen */
  1613. #endif
  1614. );
  1615. extern unsigned long XDisplayMotionBufferSize(
  1616. #if NeedFunctionPrototypes
  1617.     Display*        /* display */
  1618. #endif
  1619. );
  1620. extern VisualID XVisualIDFromVisual(
  1621. #if NeedFunctionPrototypes
  1622.     Visual*        /* visual */
  1623. #endif
  1624. );
  1625.  
  1626. /* routines for dealing with extensions */
  1627.  
  1628. extern XExtCodes *XInitExtension(
  1629. #if NeedFunctionPrototypes
  1630.     Display*        /* display */,
  1631.     _Xconst char*    /* name */
  1632. #endif
  1633. );
  1634.  
  1635. extern XExtCodes *XAddExtension(
  1636. #if NeedFunctionPrototypes
  1637.     Display*        /* display */
  1638. #endif
  1639. );
  1640. extern XExtData *XFindOnExtensionList(
  1641. #if NeedFunctionPrototypes
  1642.     XExtData**        /* structure */,
  1643.     int            /* number */
  1644. #endif
  1645. );
  1646. extern XExtData **XEHeadOfExtensionList(
  1647. #if NeedFunctionPrototypes
  1648.     XEDataObject    /* object */
  1649. #endif
  1650. );
  1651.  
  1652. /* these are routines for which there are also macros */
  1653. extern Window XRootWindow(
  1654. #if NeedFunctionPrototypes
  1655.     Display*        /* display */,
  1656.     int            /* screen_number */
  1657. #endif
  1658. );
  1659. extern Window XDefaultRootWindow(
  1660. #if NeedFunctionPrototypes
  1661.     Display*        /* display */
  1662. #endif
  1663. );
  1664. extern Window XRootWindowOfScreen(
  1665. #if NeedFunctionPrototypes
  1666.     Screen*        /* screen */
  1667. #endif
  1668. );
  1669. extern Visual *XDefaultVisual(
  1670. #if NeedFunctionPrototypes
  1671.     Display*        /* display */,
  1672.     int            /* screen_number */
  1673. #endif
  1674. );
  1675. extern Visual *XDefaultVisualOfScreen(
  1676. #if NeedFunctionPrototypes
  1677.     Screen*        /* screen */
  1678. #endif
  1679. );
  1680. extern GC XDefaultGC(
  1681. #if NeedFunctionPrototypes
  1682.     Display*        /* display */,
  1683.     int            /* screen_number */
  1684. #endif
  1685. );
  1686. extern GC XDefaultGCOfScreen(
  1687. #if NeedFunctionPrototypes
  1688.     Screen*        /* screen */
  1689. #endif
  1690. );
  1691. extern unsigned long XBlackPixel(
  1692. #if NeedFunctionPrototypes
  1693.     Display*        /* display */,
  1694.     int            /* screen_number */
  1695. #endif
  1696. );
  1697. extern unsigned long XWhitePixel(
  1698. #if NeedFunctionPrototypes
  1699.     Display*        /* display */,
  1700.     int            /* screen_number */
  1701. #endif
  1702. );
  1703. extern unsigned long XAllPlanes(
  1704. #if NeedFunctionPrototypes
  1705.     void
  1706. #endif
  1707. );
  1708. extern unsigned long XBlackPixelOfScreen(
  1709. #if NeedFunctionPrototypes
  1710.     Screen*        /* screen */
  1711. #endif
  1712. );
  1713. extern unsigned long XWhitePixelOfScreen(
  1714. #if NeedFunctionPrototypes
  1715.     Screen*        /* screen */
  1716. #endif
  1717. );
  1718. extern unsigned long XNextRequest(
  1719. #if NeedFunctionPrototypes
  1720.     Display*        /* display */
  1721. #endif
  1722. );
  1723. extern unsigned long XLastKnownRequestProcessed(
  1724. #if NeedFunctionPrototypes
  1725.     Display*        /* display */
  1726. #endif
  1727. );
  1728. extern char *XServerVendor(
  1729. #if NeedFunctionPrototypes
  1730.     Display*        /* display */
  1731. #endif
  1732. );
  1733. extern char *XDisplayString(
  1734. #if NeedFunctionPrototypes
  1735.     Display*        /* display */
  1736. #endif
  1737. );
  1738. extern Colormap XDefaultColormap(
  1739. #if NeedFunctionPrototypes
  1740.     Display*        /* display */,
  1741.     int            /* screen_number */
  1742. #endif
  1743. );
  1744. extern Colormap XDefaultColormapOfScreen(
  1745. #if NeedFunctionPrototypes
  1746.     Screen*        /* screen */
  1747. #endif
  1748. );
  1749. extern Display *XDisplayOfScreen(
  1750. #if NeedFunctionPrototypes
  1751.     Screen*        /* screen */
  1752. #endif
  1753. );
  1754. extern Screen *XScreenOfDisplay(
  1755. #if NeedFunctionPrototypes
  1756.     Display*        /* display */,
  1757.     int            /* screen_number */
  1758. #endif
  1759. );
  1760. extern Screen *XDefaultScreenOfDisplay(
  1761. #if NeedFunctionPrototypes
  1762.     Display*        /* display */
  1763. #endif
  1764. );
  1765. extern long XEventMaskOfScreen(
  1766. #if NeedFunctionPrototypes
  1767.     Screen*        /* screen */
  1768. #endif
  1769. );
  1770.  
  1771. extern int XScreenNumberOfScreen(
  1772. #if NeedFunctionPrototypes
  1773.     Screen*        /* screen */
  1774. #endif
  1775. );
  1776.  
  1777. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1778. #if NeedFunctionPrototypes
  1779.     Display*        /* display */,
  1780.     XErrorEvent*    /* error_event */
  1781. #endif
  1782. );
  1783.  
  1784. extern XErrorHandler XSetErrorHandler (
  1785. #if NeedFunctionPrototypes
  1786.     XErrorHandler    /* handler */
  1787. #endif
  1788. );
  1789.  
  1790.  
  1791. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1792. #if NeedFunctionPrototypes
  1793.     Display*        /* display */
  1794. #endif
  1795. );
  1796.  
  1797. extern XIOErrorHandler XSetIOErrorHandler (
  1798. #if NeedFunctionPrototypes
  1799.     XIOErrorHandler    /* handler */
  1800. #endif
  1801. );
  1802.  
  1803.  
  1804. extern XPixmapFormatValues *XListPixmapFormats(
  1805. #if NeedFunctionPrototypes
  1806.     Display*        /* display */,
  1807.     int*        /* count_return */
  1808. #endif
  1809. );
  1810. extern int *XListDepths(
  1811. #if NeedFunctionPrototypes
  1812.     Display*        /* display */,
  1813.     int            /* screen_number */,
  1814.     int*        /* count_return */
  1815. #endif
  1816. );
  1817.  
  1818. /* ICCCM routines for things that don't require special include files; */
  1819. /* other declarations are given in Xutil.h                             */
  1820. extern Status XReconfigureWMWindow(
  1821. #if NeedFunctionPrototypes
  1822.     Display*        /* display */,
  1823.     Window        /* w */,
  1824.     int            /* screen_number */,
  1825.     unsigned int    /* mask */,
  1826.     XWindowChanges*    /* changes */
  1827. #endif
  1828. );
  1829.  
  1830. extern Status XGetWMProtocols(
  1831. #if NeedFunctionPrototypes
  1832.     Display*        /* display */,
  1833.     Window        /* w */,
  1834.     Atom**        /* protocols_return */,
  1835.     int*        /* count_return */
  1836. #endif
  1837. );
  1838. extern Status XSetWMProtocols(
  1839. #if NeedFunctionPrototypes
  1840.     Display*        /* display */,
  1841.     Window        /* w */,
  1842.     Atom*        /* protocols */,
  1843.     int            /* count */
  1844. #endif
  1845. );
  1846. extern Status XIconifyWindow(
  1847. #if NeedFunctionPrototypes
  1848.     Display*        /* display */,
  1849.     Window        /* w */,
  1850.     int            /* screen_number */
  1851. #endif
  1852. );
  1853. extern Status XWithdrawWindow(
  1854. #if NeedFunctionPrototypes
  1855.     Display*        /* display */,
  1856.     Window        /* w */,
  1857.     int            /* screen_number */
  1858. #endif
  1859. );
  1860. extern Status XGetCommand(
  1861. #if NeedFunctionPrototypes
  1862.     Display*        /* display */,
  1863.     Window        /* w */,
  1864.     char***        /* argv_return */,
  1865.     int*        /* argc_return */
  1866. #endif
  1867. );
  1868. extern Status XGetWMColormapWindows(
  1869. #if NeedFunctionPrototypes
  1870.     Display*        /* display */,
  1871.     Window        /* w */,
  1872.     Window**        /* windows_return */,
  1873.     int*        /* count_return */
  1874. #endif
  1875. );
  1876. extern Status XSetWMColormapWindows(
  1877. #if NeedFunctionPrototypes
  1878.     Display*        /* display */,
  1879.     Window        /* w */,
  1880.     Window*        /* colormap_windows */,
  1881.     int            /* count */
  1882. #endif
  1883. );
  1884. extern void XFreeStringList(
  1885. #if NeedFunctionPrototypes
  1886.     char**        /* list */
  1887. #endif
  1888. );
  1889. extern void XSetTransientForHint(
  1890. #if NeedFunctionPrototypes
  1891.     Display*        /* display */,
  1892.     Window        /* w */,
  1893.     Window        /* prop_window */
  1894. #endif
  1895. );
  1896.  
  1897. /* The following are given in alphabetical order */
  1898.  
  1899. extern void XActivateScreenSaver(
  1900. #if NeedFunctionPrototypes
  1901.     Display*        /* display */
  1902. #endif
  1903. );
  1904.  
  1905. extern void XAddHost(
  1906. #if NeedFunctionPrototypes
  1907.     Display*        /* display */,
  1908.     XHostAddress*    /* host */
  1909. #endif
  1910. );
  1911.  
  1912. extern void XAddHosts(
  1913. #if NeedFunctionPrototypes
  1914.     Display*        /* display */,
  1915.     XHostAddress*    /* hosts */,
  1916.     int            /* num_hosts */    
  1917. #endif
  1918. );
  1919.  
  1920. extern void XAddToExtensionList(
  1921. #if NeedFunctionPrototypes
  1922.     struct _XExtData**    /* structure */,
  1923.     XExtData*        /* ext_data */
  1924. #endif
  1925. );
  1926.  
  1927. extern void XAddToSaveSet(
  1928. #if NeedFunctionPrototypes
  1929.     Display*        /* display */,
  1930.     Window        /* w */
  1931. #endif
  1932. );
  1933.  
  1934. extern Status XAllocColor(
  1935. #if NeedFunctionPrototypes
  1936.     Display*        /* display */,
  1937.     Colormap        /* colormap */,
  1938.     XColor*        /* screen_in_out */
  1939. #endif
  1940. );
  1941.  
  1942. extern Status XAllocColorCells(
  1943. #if NeedFunctionPrototypes
  1944.     Display*        /* display */,
  1945.     Colormap        /* colormap */,
  1946.     Bool            /* contig */,
  1947.     unsigned long*    /* plane_masks_return */,
  1948.     unsigned int    /* nplanes */,
  1949.     unsigned long*    /* pixels_return */,
  1950.     unsigned int     /* npixels */
  1951. #endif
  1952. );
  1953.  
  1954. extern Status XAllocColorPlanes(
  1955. #if NeedFunctionPrototypes
  1956.     Display*        /* display */,
  1957.     Colormap        /* colormap */,
  1958.     Bool        /* contig */,
  1959.     unsigned long*    /* pixels_return */,
  1960.     int            /* ncolors */,
  1961.     int            /* nreds */,
  1962.     int            /* ngreens */,
  1963.     int            /* nblues */,
  1964.     unsigned long*    /* rmask_return */,
  1965.     unsigned long*    /* gmask_return */,
  1966.     unsigned long*    /* bmask_return */
  1967. #endif
  1968. );
  1969.  
  1970. extern Status XAllocNamedColor(
  1971. #if NeedFunctionPrototypes
  1972.     Display*        /* display */,
  1973.     Colormap        /* colormap */,
  1974.     _Xconst char*    /* color_name */,
  1975.     XColor*        /* screen_def_return */,
  1976.     XColor*        /* exact_def_return */
  1977. #endif
  1978. );
  1979.  
  1980. extern void XAllowEvents(
  1981. #if NeedFunctionPrototypes
  1982.     Display*        /* display */,
  1983.     int            /* event_mode */,
  1984.     Time        /* time */
  1985. #endif
  1986. );
  1987.  
  1988. extern void XAutoRepeatOff(
  1989. #if NeedFunctionPrototypes
  1990.     Display*        /* display */
  1991. #endif
  1992. );
  1993.  
  1994. extern void XAutoRepeatOn(
  1995. #if NeedFunctionPrototypes
  1996.     Display*        /* display */
  1997. #endif
  1998. );
  1999.  
  2000. extern void XBell(
  2001. #if NeedFunctionPrototypes
  2002.     Display*        /* display */,
  2003.     int            /* percent */
  2004. #endif
  2005. );
  2006.  
  2007. extern int XBitmapBitOrder(
  2008. #if NeedFunctionPrototypes
  2009.     Display*        /* display */
  2010. #endif
  2011. );
  2012.  
  2013. extern int XBitmapPad(
  2014. #if NeedFunctionPrototypes
  2015.     Display*        /* display */
  2016. #endif
  2017. );
  2018.  
  2019. extern int XBitmapUnit(
  2020. #if NeedFunctionPrototypes
  2021.     Display*        /* display */
  2022. #endif
  2023. );
  2024.  
  2025. extern int XCellsOfScreen(
  2026. #if NeedFunctionPrototypes
  2027.     Screen*        /* screen */
  2028. #endif
  2029. );
  2030.  
  2031. extern void XChangeActivePointerGrab(
  2032. #if NeedFunctionPrototypes
  2033.     Display*        /* display */,
  2034.     unsigned int    /* event_mask */,
  2035.     Cursor        /* cursor */,
  2036.     Time        /* time */
  2037. #endif
  2038. );
  2039.  
  2040. extern void XChangeGC(
  2041. #if NeedFunctionPrototypes
  2042.     Display*        /* display */,
  2043.     GC            /* gc */,
  2044.     unsigned long    /* valuemask */,
  2045.     XGCValues*        /* values */
  2046. #endif
  2047. );
  2048.  
  2049. extern void XChangeKeyboardControl(
  2050. #if NeedFunctionPrototypes
  2051.     Display*        /* display */,
  2052.     unsigned long    /* value_mask */,
  2053.     XKeyboardControl*    /* values */
  2054. #endif
  2055. );
  2056.  
  2057. extern void XChangeKeyboardMapping(
  2058. #if NeedFunctionPrototypes
  2059.     Display*        /* display */,
  2060.     int            /* first_keycode */,
  2061.     int            /* keysyms_per_keycode */,
  2062.     KeySym*        /* keysyms */,
  2063.     int            /* num_codes */
  2064. #endif
  2065. );
  2066.  
  2067. extern void XChangePointerControl(
  2068. #if NeedFunctionPrototypes
  2069.     Display*        /* display */,
  2070.     Bool        /* do_accel */,
  2071.     Bool        /* do_threshold */,
  2072.     int            /* accel_numerator */,
  2073.     int            /* accel_denominator */,
  2074.     int            /* threshold */
  2075. #endif
  2076. );
  2077.  
  2078. extern void XChangeProperty(
  2079. #if NeedFunctionPrototypes
  2080.     Display*        /* display */,
  2081.     Window        /* w */,
  2082.     Atom        /* property */,
  2083.     Atom        /* type */,
  2084.     int            /* format */,
  2085.     int            /* mode */,
  2086.     _Xconst unsigned char*    /* data */,
  2087.     int            /* nelements */
  2088. #endif
  2089. );
  2090.  
  2091. extern void XChangeSaveSet(
  2092. #if NeedFunctionPrototypes
  2093.     Display*        /* display */,
  2094.     Window        /* w */,
  2095.     int            /* change_mode */
  2096. #endif
  2097. );
  2098.  
  2099. extern void XChangeWindowAttributes(
  2100. #if NeedFunctionPrototypes
  2101.     Display*        /* display */,
  2102.     Window        /* w */,
  2103.     unsigned long    /* valuemask */,
  2104.     XSetWindowAttributes* /* attributes */
  2105. #endif
  2106. );
  2107.  
  2108. extern Bool XCheckIfEvent(
  2109. #if NeedFunctionPrototypes
  2110.     Display*        /* display */,
  2111.     XEvent*        /* event_return */,
  2112.     Bool (*) (
  2113. #if NeedNestedPrototypes
  2114.            Display*            /* display */,
  2115.                XEvent*            /* event */,
  2116.                XPointer            /* arg */
  2117. #endif
  2118.              )        /* predicate */,
  2119.     XPointer        /* arg */
  2120. #endif
  2121. );
  2122.  
  2123. extern Bool XCheckMaskEvent(
  2124. #if NeedFunctionPrototypes
  2125.     Display*        /* display */,
  2126.     long        /* event_mask */,
  2127.     XEvent*        /* event_return */
  2128. #endif
  2129. );
  2130.  
  2131. extern Bool XCheckTypedEvent(
  2132. #if NeedFunctionPrototypes
  2133.     Display*        /* display */,
  2134.     int            /* event_type */,
  2135.     XEvent*        /* event_return */
  2136. #endif
  2137. );
  2138.  
  2139. extern Bool XCheckTypedWindowEvent(
  2140. #if NeedFunctionPrototypes
  2141.     Display*        /* display */,
  2142.     Window        /* w */,
  2143.     int            /* event_type */,
  2144.     XEvent*        /* event_return */
  2145. #endif
  2146. );
  2147.  
  2148. extern Bool XCheckWindowEvent(
  2149. #if NeedFunctionPrototypes
  2150.     Display*        /* display */,
  2151.     Window        /* w */,
  2152.     long        /* event_mask */,
  2153.     XEvent*        /* event_return */
  2154. #endif
  2155. );
  2156.  
  2157. extern void XCirculateSubwindows(
  2158. #if NeedFunctionPrototypes
  2159.     Display*        /* display */,
  2160.     Window        /* w */,
  2161.     int            /* direction */
  2162. #endif
  2163. );
  2164.  
  2165. extern void XCirculateSubwindowsDown(
  2166. #if NeedFunctionPrototypes
  2167.     Display*        /* display */,
  2168.     Window        /* w */
  2169. #endif
  2170. );
  2171.  
  2172. extern void XCirculateSubwindowsUp(
  2173. #if NeedFunctionPrototypes
  2174.     Display*        /* display */,
  2175.     Window        /* w */
  2176. #endif
  2177. );
  2178.  
  2179. extern void XClearArea(
  2180. #if NeedFunctionPrototypes
  2181.     Display*        /* display */,
  2182.     Window        /* w */,
  2183.     int            /* x */,
  2184.     int            /* y */,
  2185.     unsigned int    /* width */,
  2186.     unsigned int    /* height */,
  2187.     Bool        /* exposures */
  2188. #endif
  2189. );
  2190.  
  2191. extern void XClearWindow(
  2192. #if NeedFunctionPrototypes
  2193.     Display*        /* display */,
  2194.     Window        /* w */
  2195. #endif
  2196. );
  2197.  
  2198. extern void XCloseDisplay(
  2199. #if NeedFunctionPrototypes
  2200.     Display*        /* display */
  2201. #endif
  2202. );
  2203.  
  2204. extern void XConfigureWindow(
  2205. #if NeedFunctionPrototypes
  2206.     Display*        /* display */,
  2207.     Window        /* w */,
  2208.     unsigned int    /* value_mask */,
  2209.     XWindowChanges*    /* values */         
  2210. #endif
  2211. );
  2212.  
  2213. extern int XConnectionNumber(
  2214. #if NeedFunctionPrototypes
  2215.     Display*        /* display */
  2216. #endif
  2217. );
  2218.  
  2219. extern void XConvertSelection(
  2220. #if NeedFunctionPrototypes
  2221.     Display*        /* display */,
  2222.     Atom        /* selection */,
  2223.     Atom         /* target */,
  2224.     Atom        /* property */,
  2225.     Window        /* requestor */,
  2226.     Time        /* time */
  2227. #endif
  2228. );
  2229.  
  2230. extern void XCopyArea(
  2231. #if NeedFunctionPrototypes
  2232.     Display*        /* display */,
  2233.     Drawable        /* src */,
  2234.     Drawable        /* dest */,
  2235.     GC            /* gc */,
  2236.     int            /* src_x */,
  2237.     int            /* src_y */,
  2238.     unsigned int    /* width */,
  2239.     unsigned int    /* height */,
  2240.     int            /* dest_x */,
  2241.     int            /* dest_y */
  2242. #endif
  2243. );
  2244.  
  2245. extern void XCopyGC(
  2246. #if NeedFunctionPrototypes
  2247.     Display*        /* display */,
  2248.     GC            /* src */,
  2249.     unsigned long    /* valuemask */,
  2250.     GC            /* dest */
  2251. #endif
  2252. );
  2253.  
  2254. extern void XCopyPlane(
  2255. #if NeedFunctionPrototypes
  2256.     Display*        /* display */,
  2257.     Drawable        /* src */,
  2258.     Drawable        /* dest */,
  2259.     GC            /* gc */,
  2260.     int            /* src_x */,
  2261.     int            /* src_y */,
  2262.     unsigned int    /* width */,
  2263.     unsigned int    /* height */,
  2264.     int            /* dest_x */,
  2265.     int            /* dest_y */,
  2266.     unsigned long    /* plane */
  2267. #endif
  2268. );
  2269.  
  2270. extern int XDefaultDepth(
  2271. #if NeedFunctionPrototypes
  2272.     Display*        /* display */,
  2273.     int            /* screen_number */
  2274. #endif
  2275. );
  2276.  
  2277. extern int XDefaultDepthOfScreen(
  2278. #if NeedFunctionPrototypes
  2279.     Screen*        /* screen */
  2280. #endif
  2281. );
  2282.  
  2283. extern int XDefaultScreen(
  2284. #if NeedFunctionPrototypes
  2285.     Display*        /* display */
  2286. #endif
  2287. );
  2288.  
  2289. extern void XDefineCursor(
  2290. #if NeedFunctionPrototypes
  2291.     Display*        /* display */,
  2292.     Window        /* w */,
  2293.     Cursor        /* cursor */
  2294. #endif
  2295. );
  2296.  
  2297. extern void XDeleteProperty(
  2298. #if NeedFunctionPrototypes
  2299.     Display*        /* display */,
  2300.     Window        /* w */,
  2301.     Atom        /* property */
  2302. #endif
  2303. );
  2304.  
  2305. extern void XDestroyWindow(
  2306. #if NeedFunctionPrototypes
  2307.     Display*        /* display */,
  2308.     Window        /* w */
  2309. #endif
  2310. );
  2311.  
  2312. extern void XDestroySubwindows(
  2313. #if NeedFunctionPrototypes
  2314.     Display*        /* display */,
  2315.     Window        /* w */
  2316. #endif
  2317. );
  2318.  
  2319. extern int XDoesBackingStore(
  2320. #if NeedFunctionPrototypes
  2321.     Screen*        /* screen */    
  2322. #endif
  2323. );
  2324.  
  2325. extern Bool XDoesSaveUnders(
  2326. #if NeedFunctionPrototypes
  2327.     Screen*        /* screen */
  2328. #endif
  2329. );
  2330.  
  2331. extern void XDisableAccessControl(
  2332. #if NeedFunctionPrototypes
  2333.     Display*        /* display */
  2334. #endif
  2335. );
  2336.  
  2337.  
  2338. extern int XDisplayCells(
  2339. #if NeedFunctionPrototypes
  2340.     Display*        /* display */,
  2341.     int            /* screen_number */
  2342. #endif
  2343. );
  2344.  
  2345. extern int XDisplayHeight(
  2346. #if NeedFunctionPrototypes
  2347.     Display*        /* display */,
  2348.     int            /* screen_number */
  2349. #endif
  2350. );
  2351.  
  2352. extern int XDisplayHeightMM(
  2353. #if NeedFunctionPrototypes
  2354.     Display*        /* display */,
  2355.     int            /* screen_number */
  2356. #endif
  2357. );
  2358.  
  2359. extern void XDisplayKeycodes(
  2360. #if NeedFunctionPrototypes
  2361.     Display*        /* display */,
  2362.     int*        /* min_keycodes_return */,
  2363.     int*        /* max_keycodes_return */
  2364. #endif
  2365. );
  2366.  
  2367. extern int XDisplayPlanes(
  2368. #if NeedFunctionPrototypes
  2369.     Display*        /* display */,
  2370.     int            /* screen_number */
  2371. #endif
  2372. );
  2373.  
  2374. extern int XDisplayWidth(
  2375. #if NeedFunctionPrototypes
  2376.     Display*        /* display */,
  2377.     int            /* screen_number */
  2378. #endif
  2379. );
  2380.  
  2381. extern int XDisplayWidthMM(
  2382. #if NeedFunctionPrototypes
  2383.     Display*        /* display */,
  2384.     int            /* screen_number */
  2385. #endif
  2386. );
  2387.  
  2388. extern void XDrawArc(
  2389. #if NeedFunctionPrototypes
  2390.     Display*        /* display */,
  2391.     Drawable        /* d */,
  2392.     GC            /* gc */,
  2393.     int            /* x */,
  2394.     int            /* y */,
  2395.     unsigned int    /* width */,
  2396.     unsigned int    /* height */,
  2397.     int            /* angle1 */,
  2398.     int            /* angle2 */
  2399. #endif
  2400. );
  2401.  
  2402. extern void XDrawArcs(
  2403. #if NeedFunctionPrototypes
  2404.     Display*        /* display */,
  2405.     Drawable        /* d */,
  2406.     GC            /* gc */,
  2407.     XArc*        /* arcs */,
  2408.     int            /* narcs */
  2409. #endif
  2410. );
  2411.  
  2412. extern void XDrawImageString(
  2413. #if NeedFunctionPrototypes
  2414.     Display*        /* display */,
  2415.     Drawable        /* d */,
  2416.     GC            /* gc */,
  2417.     int            /* x */,
  2418.     int            /* y */,
  2419.     _Xconst char*    /* string */,
  2420.     int            /* length */
  2421. #endif
  2422. );
  2423.  
  2424. extern void XDrawImageString16(
  2425. #if NeedFunctionPrototypes
  2426.     Display*        /* display */,
  2427.     Drawable        /* d */,
  2428.     GC            /* gc */,
  2429.     int            /* x */,
  2430.     int            /* y */,
  2431.     _Xconst XChar2b*    /* string */,
  2432.     int            /* length */
  2433. #endif
  2434. );
  2435.  
  2436. extern void XDrawLine(
  2437. #if NeedFunctionPrototypes
  2438.     Display*        /* display */,
  2439.     Drawable        /* d */,
  2440.     GC            /* gc */,
  2441.     int            /* x1 */,
  2442.     int            /* y1 */,
  2443.     int            /* x2 */,
  2444.     int            /* y2 */
  2445. #endif
  2446. );
  2447.  
  2448. extern void XDrawLines(
  2449. #if NeedFunctionPrototypes
  2450.     Display*        /* display */,
  2451.     Drawable        /* d */,
  2452.     GC            /* gc */,
  2453.     XPoint*        /* points */,
  2454.     int            /* npoints */,
  2455.     int            /* mode */
  2456. #endif
  2457. );
  2458.  
  2459. extern void XDrawPoint(
  2460. #if NeedFunctionPrototypes
  2461.     Display*        /* display */,
  2462.     Drawable        /* d */,
  2463.     GC            /* gc */,
  2464.     int            /* x */,
  2465.     int            /* y */
  2466. #endif
  2467. );
  2468.  
  2469. extern void XDrawPoints(
  2470. #if NeedFunctionPrototypes
  2471.     Display*        /* display */,
  2472.     Drawable        /* d */,
  2473.     GC            /* gc */,
  2474.     XPoint*        /* points */,
  2475.     int            /* npoints */,
  2476.     int            /* mode */
  2477. #endif
  2478. );
  2479.  
  2480. extern void XDrawRectangle(
  2481. #if NeedFunctionPrototypes
  2482.     Display*        /* display */,
  2483.     Drawable        /* d */,
  2484.     GC            /* gc */,
  2485.     int            /* x */,
  2486.     int            /* y */,
  2487.     unsigned int    /* width */,
  2488.     unsigned int    /* height */
  2489. #endif
  2490. );
  2491.  
  2492. extern void XDrawRectangles(
  2493. #if NeedFunctionPrototypes
  2494.     Display*        /* display */,
  2495.     Drawable        /* d */,
  2496.     GC            /* gc */,
  2497.     XRectangle*        /* rectangles */,
  2498.     int            /* nrectangles */
  2499. #endif
  2500. );
  2501.  
  2502. extern void XDrawSegments(
  2503. #if NeedFunctionPrototypes
  2504.     Display*        /* display */,
  2505.     Drawable        /* d */,
  2506.     GC            /* gc */,
  2507.     XSegment*        /* segments */,
  2508.     int            /* nsegments */
  2509. #endif
  2510. );
  2511.  
  2512. extern void XDrawString(
  2513. #if NeedFunctionPrototypes
  2514.     Display*        /* display */,
  2515.     Drawable        /* d */,
  2516.     GC            /* gc */,
  2517.     int            /* x */,
  2518.     int            /* y */,
  2519.     _Xconst char*    /* string */,
  2520.     int            /* length */
  2521. #endif
  2522. );
  2523.  
  2524. extern void XDrawString16(
  2525. #if NeedFunctionPrototypes
  2526.     Display*        /* display */,
  2527.     Drawable        /* d */,
  2528.     GC            /* gc */,
  2529.     int            /* x */,
  2530.     int            /* y */,
  2531.     _Xconst XChar2b*    /* string */,
  2532.     int            /* length */
  2533. #endif
  2534. );
  2535.  
  2536. extern void XDrawText(
  2537. #if NeedFunctionPrototypes
  2538.     Display*        /* display */,
  2539.     Drawable        /* d */,
  2540.     GC            /* gc */,
  2541.     int            /* x */,
  2542.     int            /* y */,
  2543.     XTextItem*        /* items */,
  2544.     int            /* nitems */
  2545. #endif
  2546. );
  2547.  
  2548. extern void XDrawText16(
  2549. #if NeedFunctionPrototypes
  2550.     Display*        /* display */,
  2551.     Drawable        /* d */,
  2552.     GC            /* gc */,
  2553.     int            /* x */,
  2554.     int            /* y */,
  2555.     XTextItem16*    /* items */,
  2556.     int            /* nitems */
  2557. #endif
  2558. );
  2559.  
  2560. extern void XEnableAccessControl(
  2561. #if NeedFunctionPrototypes
  2562.     Display*        /* display */
  2563. #endif
  2564. );
  2565.  
  2566. extern int XEventsQueued(
  2567. #if NeedFunctionPrototypes
  2568.     Display*        /* display */,
  2569.     int            /* mode */
  2570. #endif
  2571. );
  2572.  
  2573. extern Status XFetchName(
  2574. #if NeedFunctionPrototypes
  2575.     Display*        /* display */,
  2576.     Window        /* w */,
  2577.     char**        /* window_name_return */
  2578. #endif
  2579. );
  2580.  
  2581. extern void XFillArc(
  2582. #if NeedFunctionPrototypes
  2583.     Display*        /* display */,
  2584.     Drawable        /* d */,
  2585.     GC            /* gc */,
  2586.     int            /* x */,
  2587.     int            /* y */,
  2588.     unsigned int    /* width */,
  2589.     unsigned int    /* height */,
  2590.     int            /* angle1 */,
  2591.     int            /* angle2 */
  2592. #endif
  2593. );
  2594.  
  2595. extern void XFillArcs(
  2596. #if NeedFunctionPrototypes
  2597.     Display*        /* display */,
  2598.     Drawable        /* d */,
  2599.     GC            /* gc */,
  2600.     XArc*        /* arcs */,
  2601.     int            /* narcs */
  2602. #endif
  2603. );
  2604.  
  2605. extern void XFillPolygon(
  2606. #if NeedFunctionPrototypes
  2607.     Display*        /* display */,
  2608.     Drawable        /* d */,
  2609.     GC            /* gc */,
  2610.     XPoint*        /* points */,
  2611.     int            /* npoints */,
  2612.     int            /* shape */,
  2613.     int            /* mode */
  2614. #endif
  2615. );
  2616.  
  2617. extern void XFillRectangle(
  2618. #if NeedFunctionPrototypes
  2619.     Display*        /* display */,
  2620.     Drawable        /* d */,
  2621.     GC            /* gc */,
  2622.     int            /* x */,
  2623.     int            /* y */,
  2624.     unsigned int    /* width */,
  2625.     unsigned int    /* height */
  2626. #endif
  2627. );
  2628.  
  2629. extern void XFillRectangles(
  2630. #if NeedFunctionPrototypes
  2631.     Display*        /* display */,
  2632.     Drawable        /* d */,
  2633.     GC            /* gc */,
  2634.     XRectangle*        /* rectangles */,
  2635.     int            /* nrectangles */
  2636. #endif
  2637. );
  2638.  
  2639. extern void XFlush(
  2640. #if NeedFunctionPrototypes
  2641.     Display*        /* display */
  2642. #endif
  2643. );
  2644.  
  2645. extern void XForceScreenSaver(
  2646. #if NeedFunctionPrototypes
  2647.     Display*        /* display */,
  2648.     int            /* mode */
  2649. #endif
  2650. );
  2651.  
  2652. extern void XFree(
  2653. #if NeedFunctionPrototypes
  2654.     void*        /* data */
  2655. #endif
  2656. );
  2657.  
  2658. extern void XFreeColormap(
  2659. #if NeedFunctionPrototypes
  2660.     Display*        /* display */,
  2661.     Colormap        /* colormap */
  2662. #endif
  2663. );
  2664.  
  2665. extern void XFreeColors(
  2666. #if NeedFunctionPrototypes
  2667.     Display*        /* display */,
  2668.     Colormap        /* colormap */,
  2669.     unsigned long*    /* pixels */,
  2670.     int            /* npixels */,
  2671.     unsigned long    /* planes */
  2672. #endif
  2673. );
  2674.  
  2675. extern void XFreeCursor(
  2676. #if NeedFunctionPrototypes
  2677.     Display*        /* display */,
  2678.     Cursor        /* cursor */
  2679. #endif
  2680. );
  2681.  
  2682. extern void XFreeExtensionList(
  2683. #if NeedFunctionPrototypes
  2684.     char**        /* list */    
  2685. #endif
  2686. );
  2687.  
  2688. extern void XFreeFont(
  2689. #if NeedFunctionPrototypes
  2690.     Display*        /* display */,
  2691.     XFontStruct*    /* font_struct */
  2692. #endif
  2693. );
  2694.  
  2695. extern void XFreeFontInfo(
  2696. #if NeedFunctionPrototypes
  2697.     char**        /* names */,
  2698.     XFontStruct*    /* free_info */,
  2699.     int            /* actual_count */
  2700. #endif
  2701. );
  2702.  
  2703. extern void XFreeFontNames(
  2704. #if NeedFunctionPrototypes
  2705.     char**        /* list */
  2706. #endif
  2707. );
  2708.  
  2709. extern void XFreeFontPath(
  2710. #if NeedFunctionPrototypes
  2711.     char**        /* list */
  2712. #endif
  2713. );
  2714.  
  2715. extern void XFreeGC(
  2716. #if NeedFunctionPrototypes
  2717.     Display*        /* display */,
  2718.     GC            /* gc */
  2719. #endif
  2720. );
  2721.  
  2722. extern void XFreeModifiermap(
  2723. #if NeedFunctionPrototypes
  2724.     XModifierKeymap*    /* modmap */
  2725. #endif
  2726. );
  2727.  
  2728. extern void XFreePixmap(
  2729. #if NeedFunctionPrototypes
  2730.     Display*        /* display */,
  2731.     Pixmap        /* pixmap */
  2732. #endif
  2733. );
  2734.  
  2735. extern int XGeometry(
  2736. #if NeedFunctionPrototypes
  2737.     Display*        /* display */,
  2738.     int            /* screen */,
  2739.     _Xconst char*    /* position */,
  2740.     _Xconst char*    /* default_position */,
  2741.     unsigned int    /* bwidth */,
  2742.     unsigned int    /* fwidth */,
  2743.     unsigned int    /* fheight */,
  2744.     int            /* xadder */,
  2745.     int            /* yadder */,
  2746.     int*        /* x_return */,
  2747.     int*        /* y_return */,
  2748.     int*        /* width_return */,
  2749.     int*        /* height_return */
  2750. #endif
  2751. );
  2752.  
  2753. extern void XGetErrorDatabaseText(
  2754. #if NeedFunctionPrototypes
  2755.     Display*        /* display */,
  2756.     _Xconst char*    /* name */,
  2757.     _Xconst char*    /* message */,
  2758.     _Xconst char*    /* default_string */,
  2759.     char*        /* buffer_return */,
  2760.     int            /* length */
  2761. #endif
  2762. );
  2763.  
  2764. extern void XGetErrorText(
  2765. #if NeedFunctionPrototypes
  2766.     Display*        /* display */,
  2767.     int            /* code */,
  2768.     char*        /* buffer_return */,
  2769.     int            /* length */
  2770. #endif
  2771. );
  2772.  
  2773. extern Bool XGetFontProperty(
  2774. #if NeedFunctionPrototypes
  2775.     XFontStruct*    /* font_struct */,
  2776.     Atom        /* atom */,
  2777.     unsigned long*    /* value_return */
  2778. #endif
  2779. );
  2780.  
  2781. extern Status XGetGCValues(
  2782. #if NeedFunctionPrototypes
  2783.     Display*        /* display */,
  2784.     GC            /* gc */,
  2785.     unsigned long    /* valuemask */,
  2786.     XGCValues*        /* values_return */
  2787. #endif
  2788. );
  2789.  
  2790. extern Status XGetGeometry(
  2791. #if NeedFunctionPrototypes
  2792.     Display*        /* display */,
  2793.     Drawable        /* d */,
  2794.     Window*        /* root_return */,
  2795.     int*        /* x_return */,
  2796.     int*        /* y_return */,
  2797.     unsigned int*    /* width_return */,
  2798.     unsigned int*    /* height_return */,
  2799.     unsigned int*    /* border_width_return */,
  2800.     unsigned int*    /* depth_return */
  2801. #endif
  2802. );
  2803.  
  2804. extern Status XGetIconName(
  2805. #if NeedFunctionPrototypes
  2806.     Display*        /* display */,
  2807.     Window        /* w */,
  2808.     char**        /* icon_name_return */
  2809. #endif
  2810. );
  2811.  
  2812. extern void XGetInputFocus(
  2813. #if NeedFunctionPrototypes
  2814.     Display*        /* display */,
  2815.     Window*        /* focus_return */,
  2816.     int*        /* revert_to_return */
  2817. #endif
  2818. );
  2819.  
  2820. extern void XGetKeyboardControl(
  2821. #if NeedFunctionPrototypes
  2822.     Display*        /* display */,
  2823.     XKeyboardState*    /* values_return */
  2824. #endif
  2825. );
  2826.  
  2827. extern void XGetPointerControl(
  2828. #if NeedFunctionPrototypes
  2829.     Display*        /* display */,
  2830.     int*        /* accel_numerator_return */,
  2831.     int*        /* accel_denominator_return */,
  2832.     int*        /* threshold_return */
  2833. #endif
  2834. );
  2835.  
  2836. extern int XGetPointerMapping(
  2837. #if NeedFunctionPrototypes
  2838.     Display*        /* display */,
  2839.     unsigned char*    /* map_return */,
  2840.     int            /* nmap */
  2841. #endif
  2842. );
  2843.  
  2844. extern void XGetScreenSaver(
  2845. #if NeedFunctionPrototypes
  2846.     Display*        /* display */,
  2847.     int*        /* timeout_return */,
  2848.     int*        /* interval_return */,
  2849.     int*        /* prefer_blanking_return */,
  2850.     int*        /* allow_exposures_return */
  2851. #endif
  2852. );
  2853.  
  2854. extern Status XGetTransientForHint(
  2855. #if NeedFunctionPrototypes
  2856.     Display*        /* display */,
  2857.     Window        /* w */,
  2858.     Window*        /* prop_window_return */
  2859. #endif
  2860. );
  2861.  
  2862. extern int XGetWindowProperty(
  2863. #if NeedFunctionPrototypes
  2864.     Display*        /* display */,
  2865.     Window        /* w */,
  2866.     Atom        /* property */,
  2867.     long        /* long_offset */,
  2868.     long        /* long_length */,
  2869.     Bool        /* delete */,
  2870.     Atom        /* req_type */,
  2871.     Atom*        /* actual_type_return */,
  2872.     int*        /* actual_format_return */,
  2873.     unsigned long*    /* nitems_return */,
  2874.     unsigned long*    /* bytes_after_return */,
  2875.     unsigned char**    /* prop_return */
  2876. #endif
  2877. );
  2878.  
  2879. extern Status XGetWindowAttributes(
  2880. #if NeedFunctionPrototypes
  2881.     Display*        /* display */,
  2882.     Window        /* w */,
  2883.     XWindowAttributes*    /* window_attributes_return */
  2884. #endif
  2885. );
  2886.  
  2887. extern void XGrabButton(
  2888. #if NeedFunctionPrototypes
  2889.     Display*        /* display */,
  2890.     unsigned int    /* button */,
  2891.     unsigned int    /* modifiers */,
  2892.     Window        /* grab_window */,
  2893.     Bool        /* owner_events */,
  2894.     unsigned int    /* event_mask */,
  2895.     int            /* pointer_mode */,
  2896.     int            /* keyboard_mode */,
  2897.     Window        /* confine_to */,
  2898.     Cursor        /* cursor */
  2899. #endif
  2900. );
  2901.  
  2902. extern void XGrabKey(
  2903. #if NeedFunctionPrototypes
  2904.     Display*        /* display */,
  2905.     int            /* keycode */,
  2906.     unsigned int    /* modifiers */,
  2907.     Window        /* grab_window */,
  2908.     Bool        /* owner_events */,
  2909.     int            /* pointer_mode */,
  2910.     int            /* keyboard_mode */
  2911. #endif
  2912. );
  2913.  
  2914. extern int XGrabKeyboard(
  2915. #if NeedFunctionPrototypes
  2916.     Display*        /* display */,
  2917.     Window        /* grab_window */,
  2918.     Bool        /* owner_events */,
  2919.     int            /* pointer_mode */,
  2920.     int            /* keyboard_mode */,
  2921.     Time        /* time */
  2922. #endif
  2923. );
  2924.  
  2925. extern int XGrabPointer(
  2926. #if NeedFunctionPrototypes
  2927.     Display*        /* display */,
  2928.     Window        /* grab_window */,
  2929.     Bool        /* owner_events */,
  2930.     unsigned int    /* event_mask */,
  2931.     int            /* pointer_mode */,
  2932.     int            /* keyboard_mode */,
  2933.     Window        /* confine_to */,
  2934.     Cursor        /* cursor */,
  2935.     Time        /* time */
  2936. #endif
  2937. );
  2938.  
  2939. extern void XGrabServer(
  2940. #if NeedFunctionPrototypes
  2941.     Display*        /* display */
  2942. #endif
  2943. );
  2944.  
  2945. extern int XHeightMMOfScreen(
  2946. #if NeedFunctionPrototypes
  2947.     Screen*        /* screen */
  2948. #endif
  2949. );
  2950.  
  2951. extern int XHeightOfScreen(
  2952. #if NeedFunctionPrototypes
  2953.     Screen*        /* screen */
  2954. #endif
  2955. );
  2956.  
  2957. extern void XIfEvent(
  2958. #if NeedFunctionPrototypes
  2959.     Display*        /* display */,
  2960.     XEvent*        /* event_return */,
  2961.     Bool (*) (
  2962. #if NeedNestedPrototypes
  2963.            Display*            /* display */,
  2964.                XEvent*            /* event */,
  2965.                XPointer            /* arg */
  2966. #endif
  2967.              )        /* predicate */,
  2968.     XPointer        /* arg */
  2969. #endif
  2970. );
  2971.  
  2972. extern int XImageByteOrder(
  2973. #if NeedFunctionPrototypes
  2974.     Display*        /* display */
  2975. #endif
  2976. );
  2977.  
  2978. extern void XInstallColormap(
  2979. #if NeedFunctionPrototypes
  2980.     Display*        /* display */,
  2981.     Colormap        /* colormap */
  2982. #endif
  2983. );
  2984.  
  2985. extern KeyCode XKeysymToKeycode(
  2986. #if NeedFunctionPrototypes
  2987.     Display*        /* display */,
  2988.     KeySym        /* keysym */
  2989. #endif
  2990. );
  2991.  
  2992. extern void XKillClient(
  2993. #if NeedFunctionPrototypes
  2994.     Display*        /* display */,
  2995.     XID            /* resource */
  2996. #endif
  2997. );
  2998.  
  2999. extern unsigned long XLastKnownRequestProcessed(
  3000. #if NeedFunctionPrototypes
  3001.     Display*        /* display */
  3002. #endif
  3003. );
  3004.  
  3005. extern Status XLookupColor(
  3006. #if NeedFunctionPrototypes
  3007.     Display*        /* display */,
  3008.     Colormap        /* colormap */,
  3009.     _Xconst char*    /* color_name */,
  3010.     XColor*        /* exact_def_return */,
  3011.     XColor*        /* screen_def_return */
  3012. #endif
  3013. );
  3014.  
  3015. extern void XLowerWindow(
  3016. #if NeedFunctionPrototypes
  3017.     Display*        /* display */,
  3018.     Window        /* w */
  3019. #endif
  3020. );
  3021.  
  3022. extern void XMapRaised(
  3023. #if NeedFunctionPrototypes
  3024.     Display*        /* display */,
  3025.     Window        /* w */
  3026. #endif
  3027. );
  3028.  
  3029. extern void XMapSubwindows(
  3030. #if NeedFunctionPrototypes
  3031.     Display*        /* display */,
  3032.     Window        /* w */
  3033. #endif
  3034. );
  3035.  
  3036. extern void XMapWindow(
  3037. #if NeedFunctionPrototypes
  3038.     Display*        /* display */,
  3039.     Window        /* w */
  3040. #endif
  3041. );
  3042.  
  3043. extern void XMaskEvent(
  3044. #if NeedFunctionPrototypes
  3045.     Display*        /* display */,
  3046.     long        /* event_mask */,
  3047.     XEvent*        /* event_return */
  3048. #endif
  3049. );
  3050.  
  3051. extern int XMaxCmapsOfScreen(
  3052. #if NeedFunctionPrototypes
  3053.     Screen*        /* screen */
  3054. #endif
  3055. );
  3056.  
  3057. extern int XMinCmapsOfScreen(
  3058. #if NeedFunctionPrototypes
  3059.     Screen*        /* screen */
  3060. #endif
  3061. );
  3062.  
  3063. extern void XMoveResizeWindow(
  3064. #if NeedFunctionPrototypes
  3065.     Display*        /* display */,
  3066.     Window        /* w */,
  3067.     int            /* x */,
  3068.     int            /* y */,
  3069.     unsigned int    /* width */,
  3070.     unsigned int    /* height */
  3071. #endif
  3072. );
  3073.  
  3074. extern void XMoveWindow(
  3075. #if NeedFunctionPrototypes
  3076.     Display*        /* display */,
  3077.     Window        /* w */,
  3078.     int            /* x */,
  3079.     int            /* y */
  3080. #endif
  3081. );
  3082.  
  3083. extern void XNextEvent(
  3084. #if NeedFunctionPrototypes
  3085.     Display*        /* display */,
  3086.     XEvent*        /* event_return */
  3087. #endif
  3088. );
  3089.  
  3090. extern void XNoOp(
  3091. #if NeedFunctionPrototypes
  3092.     Display*        /* display */
  3093. #endif
  3094. );
  3095.  
  3096. extern Status XParseColor(
  3097. #if NeedFunctionPrototypes
  3098.     Display*        /* display */,
  3099.     Colormap        /* colormap */,
  3100.     _Xconst char*    /* spec */,
  3101.     XColor*        /* exact_def_return */
  3102. #endif
  3103. );
  3104.  
  3105. extern int XParseGeometry(
  3106. #if NeedFunctionPrototypes
  3107.     _Xconst char*    /* parsestring */,
  3108.     int*        /* x_return */,
  3109.     int*        /* y_return */,
  3110.     unsigned int*    /* width_return */,
  3111.     unsigned int*    /* height_return */
  3112. #endif
  3113. );
  3114.  
  3115. extern void XPeekEvent(
  3116. #if NeedFunctionPrototypes
  3117.     Display*        /* display */,
  3118.     XEvent*        /* event_return */
  3119. #endif
  3120. );
  3121.  
  3122. extern void XPeekIfEvent(
  3123. #if NeedFunctionPrototypes
  3124.     Display*        /* display */,
  3125.     XEvent*        /* event_return */,
  3126.     Bool (*) (
  3127. #if NeedNestedPrototypes
  3128.            Display*        /* display */,
  3129.                XEvent*        /* event */,
  3130.                XPointer        /* arg */
  3131. #endif
  3132.              )        /* predicate */,
  3133.     XPointer        /* arg */
  3134. #endif
  3135. );
  3136.  
  3137. extern int XPending(
  3138. #if NeedFunctionPrototypes
  3139.     Display*        /* display */
  3140. #endif
  3141. );
  3142.  
  3143. extern int XPlanesOfScreen(
  3144. #if NeedFunctionPrototypes
  3145.     Screen*        /* screen */
  3146.     
  3147. #endif
  3148. );
  3149.  
  3150. extern int XProtocolRevision(
  3151. #if NeedFunctionPrototypes
  3152.     Display*        /* display */
  3153. #endif
  3154. );
  3155.  
  3156. extern int XProtocolVersion(
  3157. #if NeedFunctionPrototypes
  3158.     Display*        /* display */
  3159. #endif
  3160. );
  3161.  
  3162.  
  3163. extern void XPutBackEvent(
  3164. #if NeedFunctionPrototypes
  3165.     Display*        /* display */,
  3166.     XEvent*        /* event */
  3167. #endif
  3168. );
  3169.  
  3170. extern void XPutImage(
  3171. #if NeedFunctionPrototypes
  3172.     Display*        /* display */,
  3173.     Drawable        /* d */,
  3174.     GC            /* gc */,
  3175.     XImage*        /* image */,
  3176.     int            /* src_x */,
  3177.     int            /* src_y */,
  3178.     int            /* dest_x */,
  3179.     int            /* dest_y */,
  3180.     unsigned int    /* width */,
  3181.     unsigned int    /* height */      
  3182. #endif
  3183. );
  3184.  
  3185. extern int XQLength(
  3186. #if NeedFunctionPrototypes
  3187.     Display*        /* display */
  3188. #endif
  3189. );
  3190.  
  3191. extern Status XQueryBestCursor(
  3192. #if NeedFunctionPrototypes
  3193.     Display*        /* display */,
  3194.     Drawable        /* d */,
  3195.     unsigned int        /* width */,
  3196.     unsigned int    /* height */,
  3197.     unsigned int*    /* width_return */,
  3198.     unsigned int*    /* height_return */
  3199. #endif
  3200. );
  3201.  
  3202. extern Status XQueryBestSize(
  3203. #if NeedFunctionPrototypes
  3204.     Display*        /* display */,
  3205.     int            /* class */,
  3206.     Drawable        /* which_screen */,
  3207.     unsigned int    /* width */,
  3208.     unsigned int    /* height */,
  3209.     unsigned int*    /* width_return */,
  3210.     unsigned int*    /* height_return */
  3211. #endif
  3212. );
  3213.  
  3214. extern Status XQueryBestStipple(
  3215. #if NeedFunctionPrototypes
  3216.     Display*        /* display */,
  3217.     Drawable        /* which_screen */,
  3218.     unsigned int    /* width */,
  3219.     unsigned int    /* height */,
  3220.     unsigned int*    /* width_return */,
  3221.     unsigned int*    /* height_return */
  3222. #endif
  3223. );
  3224.  
  3225. extern Status XQueryBestTile(
  3226. #if NeedFunctionPrototypes
  3227.     Display*        /* display */,
  3228.     Drawable        /* which_screen */,
  3229.     unsigned int    /* width */,
  3230.     unsigned int    /* height */,
  3231.     unsigned int*    /* width_return */,
  3232.     unsigned int*    /* height_return */
  3233. #endif
  3234. );
  3235.  
  3236. extern void XQueryColor(
  3237. #if NeedFunctionPrototypes
  3238.     Display*        /* display */,
  3239.     Colormap        /* colormap */,
  3240.     XColor*        /* def_in_out */
  3241. #endif
  3242. );
  3243.  
  3244. extern void XQueryColors(
  3245. #if NeedFunctionPrototypes
  3246.     Display*        /* display */,
  3247.     Colormap        /* colormap */,
  3248.     XColor*        /* defs_in_out */,
  3249.     int            /* ncolors */
  3250. #endif
  3251. );
  3252.  
  3253. extern Bool XQueryExtension(
  3254. #if NeedFunctionPrototypes
  3255.     Display*        /* display */,
  3256.     _Xconst char*    /* name */,
  3257.     int*        /* major_opcode_return */,
  3258.     int*        /* first_event_return */,
  3259.     int*        /* first_error_return */
  3260. #endif
  3261. );
  3262.  
  3263. extern void XQueryKeymap(
  3264. #if NeedFunctionPrototypes
  3265.     Display*        /* display */,
  3266.     char [32]        /* keys_return */
  3267. #endif
  3268. );
  3269.  
  3270. extern Bool XQueryPointer(
  3271. #if NeedFunctionPrototypes
  3272.     Display*        /* display */,
  3273.     Window        /* w */,
  3274.     Window*        /* root_return */,
  3275.     Window*        /* child_return */,
  3276.     int*        /* root_x_return */,
  3277.     int*        /* root_y_return */,
  3278.     int*        /* win_x_return */,
  3279.     int*        /* win_y_return */,
  3280.     unsigned int*       /* mask_return */
  3281. #endif
  3282. );
  3283.  
  3284. extern void XQueryTextExtents(
  3285. #if NeedFunctionPrototypes
  3286.     Display*        /* display */,
  3287.     XID            /* font_ID */,
  3288.     _Xconst char*    /* string */,
  3289.     int            /* nchars */,
  3290.     int*        /* direction_return */,
  3291.     int*        /* font_ascent_return */,
  3292.     int*        /* font_descent_return */,
  3293.     XCharStruct*    /* overall_return */    
  3294. #endif
  3295. );
  3296.  
  3297. extern void XQueryTextExtents16(
  3298. #if NeedFunctionPrototypes
  3299.     Display*        /* display */,
  3300.     XID            /* font_ID */,
  3301.     _Xconst XChar2b*    /* string */,
  3302.     int            /* nchars */,
  3303.     int*        /* direction_return */,
  3304.     int*        /* font_ascent_return */,
  3305.     int*        /* font_descent_return */,
  3306.     XCharStruct*    /* overall_return */
  3307. #endif
  3308. );
  3309.  
  3310. extern Status XQueryTree(
  3311. #if NeedFunctionPrototypes
  3312.     Display*        /* display */,
  3313.     Window        /* w */,
  3314.     Window*        /* root_return */,
  3315.     Window*        /* parent_return */,
  3316.     Window**        /* children_return */,
  3317.     unsigned int*    /* nchildren_return */
  3318. #endif
  3319. );
  3320.  
  3321. extern void XRaiseWindow(
  3322. #if NeedFunctionPrototypes
  3323.     Display*        /* display */,
  3324.     Window        /* w */
  3325. #endif
  3326. );
  3327.  
  3328. extern int XReadBitmapFile(
  3329. #if NeedFunctionPrototypes
  3330.     Display*        /* display */,
  3331.     Drawable         /* d */,
  3332.     _Xconst char*    /* filename */,
  3333.     unsigned int*    /* width_return */,
  3334.     unsigned int*    /* height_return */,
  3335.     Pixmap*        /* bitmap_return */,
  3336.     int*        /* x_hot_return */,
  3337.     int*        /* y_hot_return */
  3338. #endif
  3339. );
  3340.  
  3341. extern void XRebindKeysym(
  3342. #if NeedFunctionPrototypes
  3343.     Display*        /* display */,
  3344.     KeySym        /* keysym */,
  3345.     KeySym*        /* list */,
  3346.     int            /* mod_count */,
  3347.     _Xconst unsigned char*    /* string */,
  3348.     int            /* bytes_string */
  3349. #endif
  3350. );
  3351.  
  3352. extern void XRecolorCursor(
  3353. #if NeedFunctionPrototypes
  3354.     Display*        /* display */,
  3355.     Cursor        /* cursor */,
  3356.     XColor*        /* foreground_color */,
  3357.     XColor*        /* background_color */
  3358. #endif
  3359. );
  3360.  
  3361. extern void XRefreshKeyboardMapping(
  3362. #if NeedFunctionPrototypes
  3363.     XMappingEvent*    /* event_map */    
  3364. #endif
  3365. );
  3366.  
  3367. extern void XRemoveFromSaveSet(
  3368. #if NeedFunctionPrototypes
  3369.     Display*        /* display */,
  3370.     Window        /* w */
  3371. #endif
  3372. );
  3373.  
  3374. extern void XRemoveHost(
  3375. #if NeedFunctionPrototypes
  3376.     Display*        /* display */,
  3377.     XHostAddress*    /* host */
  3378. #endif
  3379. );
  3380.  
  3381. extern void XRemoveHosts(
  3382. #if NeedFunctionPrototypes
  3383.     Display*        /* display */,
  3384.     XHostAddress*    /* hosts */,
  3385.     int            /* num_hosts */
  3386. #endif
  3387. );
  3388.  
  3389. extern void XReparentWindow(
  3390. #if NeedFunctionPrototypes
  3391.     Display*        /* display */,
  3392.     Window        /* w */,
  3393.     Window        /* parent */,
  3394.     int            /* x */,
  3395.     int            /* y */
  3396. #endif
  3397. );
  3398.  
  3399. extern void XResetScreenSaver(
  3400. #if NeedFunctionPrototypes
  3401.     Display*        /* display */
  3402. #endif
  3403. );
  3404.  
  3405. extern void XResizeWindow(
  3406. #if NeedFunctionPrototypes
  3407.     Display*        /* display */,
  3408.     Window        /* w */,
  3409.     unsigned int    /* width */,
  3410.     unsigned int    /* height */
  3411. #endif
  3412. );
  3413.  
  3414. extern void XRestackWindows(
  3415. #if NeedFunctionPrototypes
  3416.     Display*        /* display */,
  3417.     Window*        /* windows */,
  3418.     int            /* nwindows */
  3419. #endif
  3420. );
  3421.  
  3422. extern void XRotateBuffers(
  3423. #if NeedFunctionPrototypes
  3424.     Display*        /* display */,
  3425.     int            /* rotate */
  3426. #endif
  3427. );
  3428.  
  3429. extern void XRotateWindowProperties(
  3430. #if NeedFunctionPrototypes
  3431.     Display*        /* display */,
  3432.     Window        /* w */,
  3433.     Atom*        /* properties */,
  3434.     int            /* num_prop */,
  3435.     int            /* npositions */
  3436. #endif
  3437. );
  3438.  
  3439. extern int XScreenCount(
  3440. #if NeedFunctionPrototypes
  3441.     Display*        /* display */
  3442. #endif
  3443. );
  3444.  
  3445. extern void XSelectInput(
  3446. #if NeedFunctionPrototypes
  3447.     Display*        /* display */,
  3448.     Window        /* w */,
  3449.     long        /* event_mask */
  3450. #endif
  3451. );
  3452.  
  3453. extern Status XSendEvent(
  3454. #if NeedFunctionPrototypes
  3455.     Display*        /* display */,
  3456.     Window        /* w */,
  3457.     Bool        /* propagate */,
  3458.     long        /* event_mask */,
  3459.     XEvent*        /* event_send */
  3460. #endif
  3461. );
  3462.  
  3463. extern void XSetAccessControl(
  3464. #if NeedFunctionPrototypes
  3465.     Display*        /* display */,
  3466.     int            /* mode */
  3467. #endif
  3468. );
  3469.  
  3470. extern void XSetArcMode(
  3471. #if NeedFunctionPrototypes
  3472.     Display*        /* display */,
  3473.     GC            /* gc */,
  3474.     int            /* arc_mode */
  3475. #endif
  3476. );
  3477.  
  3478. extern void XSetBackground(
  3479. #if NeedFunctionPrototypes
  3480.     Display*        /* display */,
  3481.     GC            /* gc */,
  3482.     unsigned long    /* background */
  3483. #endif
  3484. );
  3485.  
  3486. extern void XSetClipMask(
  3487. #if NeedFunctionPrototypes
  3488.     Display*        /* display */,
  3489.     GC            /* gc */,
  3490.     Pixmap        /* pixmap */
  3491. #endif
  3492. );
  3493.  
  3494. extern void XSetClipOrigin(
  3495. #if NeedFunctionPrototypes
  3496.     Display*        /* display */,
  3497.     GC            /* gc */,
  3498.     int            /* clip_x_origin */,
  3499.     int            /* clip_y_origin */
  3500. #endif
  3501. );
  3502.  
  3503. extern void XSetClipRectangles(
  3504. #if NeedFunctionPrototypes
  3505.     Display*        /* display */,
  3506.     GC            /* gc */,
  3507.     int            /* clip_x_origin */,
  3508.     int            /* clip_y_origin */,
  3509.     XRectangle*        /* rectangles */,
  3510.     int            /* n */,
  3511.     int            /* ordering */
  3512. #endif
  3513. );
  3514.  
  3515. extern void XSetCloseDownMode(
  3516. #if NeedFunctionPrototypes
  3517.     Display*        /* display */,
  3518.     int            /* close_mode */
  3519. #endif
  3520. );
  3521.  
  3522. extern void XSetCommand(
  3523. #if NeedFunctionPrototypes
  3524.     Display*        /* display */,
  3525.     Window        /* w */,
  3526.     char**        /* argv */,
  3527.     int            /* argc */
  3528. #endif
  3529. );
  3530.  
  3531. extern void XSetDashes(
  3532. #if NeedFunctionPrototypes
  3533.     Display*        /* display */,
  3534.     GC            /* gc */,
  3535.     int            /* dash_offset */,
  3536.     _Xconst char*    /* dash_list */,
  3537.     int            /* n */
  3538. #endif
  3539. );
  3540.  
  3541. extern void XSetFillRule(
  3542. #if NeedFunctionPrototypes
  3543.     Display*        /* display */,
  3544.     GC            /* gc */,
  3545.     int            /* fill_rule */
  3546. #endif
  3547. );
  3548.  
  3549. extern void XSetFillStyle(
  3550. #if NeedFunctionPrototypes
  3551.     Display*        /* display */,
  3552.     GC            /* gc */,
  3553.     int            /* fill_style */
  3554. #endif
  3555. );
  3556.  
  3557. extern void XSetFont(
  3558. #if NeedFunctionPrototypes
  3559.     Display*        /* display */,
  3560.     GC            /* gc */,
  3561.     Font        /* font */
  3562. #endif
  3563. );
  3564.  
  3565. extern void XSetFontPath(
  3566. #if NeedFunctionPrototypes
  3567.     Display*        /* display */,
  3568.     char**        /* directories */,
  3569.     int            /* ndirs */         
  3570. #endif
  3571. );
  3572.  
  3573. extern void XSetForeground(
  3574. #if NeedFunctionPrototypes
  3575.     Display*        /* display */,
  3576.     GC            /* gc */,
  3577.     unsigned long    /* foreground */
  3578. #endif
  3579. );
  3580.  
  3581. extern void XSetFunction(
  3582. #if NeedFunctionPrototypes
  3583.     Display*        /* display */,
  3584.     GC            /* gc */,
  3585.     int            /* function */
  3586. #endif
  3587. );
  3588.  
  3589. extern void XSetGraphicsExposures(
  3590. #if NeedFunctionPrototypes
  3591.     Display*        /* display */,
  3592.     GC            /* gc */,
  3593.     Bool        /* graphics_exposures */
  3594. #endif
  3595. );
  3596.  
  3597. extern void XSetIconName(
  3598. #if NeedFunctionPrototypes
  3599.     Display*        /* display */,
  3600.     Window        /* w */,
  3601.     _Xconst char*    /* icon_name */
  3602. #endif
  3603. );
  3604.  
  3605. extern void XSetInputFocus(
  3606. #if NeedFunctionPrototypes
  3607.     Display*        /* display */,
  3608.     Window        /* focus */,
  3609.     int            /* revert_to */,
  3610.     Time        /* time */
  3611. #endif
  3612. );
  3613.  
  3614. extern void XSetLineAttributes(
  3615. #if NeedFunctionPrototypes
  3616.     Display*        /* display */,
  3617.     GC            /* gc */,
  3618.     unsigned int    /* line_width */,
  3619.     int            /* line_style */,
  3620.     int            /* cap_style */,
  3621.     int            /* join_style */
  3622. #endif
  3623. );
  3624.  
  3625. extern int XSetModifierMapping(
  3626. #if NeedFunctionPrototypes
  3627.     Display*        /* display */,
  3628.     XModifierKeymap*    /* modmap */
  3629. #endif
  3630. );
  3631.  
  3632. extern void XSetPlaneMask(
  3633. #if NeedFunctionPrototypes
  3634.     Display*        /* display */,
  3635.     GC            /* gc */,
  3636.     unsigned long    /* plane_mask */
  3637. #endif
  3638. );
  3639.  
  3640. extern int XSetPointerMapping(
  3641. #if NeedFunctionPrototypes
  3642.     Display*        /* display */,
  3643.     _Xconst unsigned char*    /* map */,
  3644.     int            /* nmap */
  3645. #endif
  3646. );
  3647.  
  3648. extern void XSetScreenSaver(
  3649. #if NeedFunctionPrototypes
  3650.     Display*        /* display */,
  3651.     int            /* timeout */,
  3652.     int            /* interval */,
  3653.     int            /* prefer_blanking */,
  3654.     int            /* allow_exposures */
  3655. #endif
  3656. );
  3657.  
  3658. extern void XSetSelectionOwner(
  3659. #if NeedFunctionPrototypes
  3660.     Display*        /* display */,
  3661.     Atom            /* selection */,
  3662.     Window        /* owner */,
  3663.     Time        /* time */
  3664. #endif
  3665. );
  3666.  
  3667. extern void XSetState(
  3668. #if NeedFunctionPrototypes
  3669.     Display*        /* display */,
  3670.     GC            /* gc */,
  3671.     unsigned long     /* foreground */,
  3672.     unsigned long    /* background */,
  3673.     int            /* function */,
  3674.     unsigned long    /* plane_mask */
  3675. #endif
  3676. );
  3677.  
  3678. extern void XSetStipple(
  3679. #if NeedFunctionPrototypes
  3680.     Display*        /* display */,
  3681.     GC            /* gc */,
  3682.     Pixmap        /* stipple */
  3683. #endif
  3684. );
  3685.  
  3686. extern void XSetSubwindowMode(
  3687. #if NeedFunctionPrototypes
  3688.     Display*        /* display */,
  3689.     GC            /* gc */,
  3690.     int            /* subwindow_mode */
  3691. #endif
  3692. );
  3693.  
  3694. extern void XSetTSOrigin(
  3695. #if NeedFunctionPrototypes
  3696.     Display*        /* display */,
  3697.     GC            /* gc */,
  3698.     int            /* ts_x_origin */,
  3699.     int            /* ts_y_origin */
  3700. #endif
  3701. );
  3702.  
  3703. extern void XSetTile(
  3704. #if NeedFunctionPrototypes
  3705.     Display*        /* display */,
  3706.     GC            /* gc */,
  3707.     Pixmap        /* tile */
  3708. #endif
  3709. );
  3710.  
  3711. extern void XSetWindowBackground(
  3712. #if NeedFunctionPrototypes
  3713.     Display*        /* display */,
  3714.     Window        /* w */,
  3715.     unsigned long    /* background_pixel */
  3716. #endif
  3717. );
  3718.  
  3719. extern void XSetWindowBackgroundPixmap(
  3720. #if NeedFunctionPrototypes
  3721.     Display*        /* display */,
  3722.     Window        /* w */,
  3723.     Pixmap        /* background_pixmap */
  3724. #endif
  3725. );
  3726.  
  3727. extern void XSetWindowBorder(
  3728. #if NeedFunctionPrototypes
  3729.     Display*        /* display */,
  3730.     Window        /* w */,
  3731.     unsigned long    /* border_pixel */
  3732. #endif
  3733. );
  3734.  
  3735. extern void XSetWindowBorderPixmap(
  3736. #if NeedFunctionPrototypes
  3737.     Display*        /* display */,
  3738.     Window        /* w */,
  3739.     Pixmap        /* border_pixmap */
  3740. #endif
  3741. );
  3742.  
  3743. extern void XSetWindowBorderWidth(
  3744. #if NeedFunctionPrototypes
  3745.     Display*        /* display */,
  3746.     Window        /* w */,
  3747.     unsigned int    /* width */
  3748. #endif
  3749. );
  3750.  
  3751. extern void XSetWindowColormap(
  3752. #if NeedFunctionPrototypes
  3753.     Display*        /* display */,
  3754.     Window        /* w */,
  3755.     Colormap        /* colormap */
  3756. #endif
  3757. );
  3758.  
  3759. extern void XStoreBuffer(
  3760. #if NeedFunctionPrototypes
  3761.     Display*        /* display */,
  3762.     _Xconst char*    /* bytes */,
  3763.     int            /* nbytes */,
  3764.     int            /* buffer */
  3765. #endif
  3766. );
  3767.  
  3768. extern void XStoreBytes(
  3769. #if NeedFunctionPrototypes
  3770.     Display*        /* display */,
  3771.     _Xconst char*    /* bytes */,
  3772.     int            /* nbytes */
  3773. #endif
  3774. );
  3775.  
  3776. extern void XStoreColor(
  3777. #if NeedFunctionPrototypes
  3778.     Display*        /* display */,
  3779.     Colormap        /* colormap */,
  3780.     XColor*        /* color */
  3781. #endif
  3782. );
  3783.  
  3784. extern void XStoreColors(
  3785. #if NeedFunctionPrototypes
  3786.     Display*        /* display */,
  3787.     Colormap        /* colormap */,
  3788.     XColor*        /* color */,
  3789.     int            /* ncolors */
  3790. #endif
  3791. );
  3792.  
  3793. extern void XStoreName(
  3794. #if NeedFunctionPrototypes
  3795.     Display*        /* display */,
  3796.     Window        /* w */,
  3797.     _Xconst char*    /* window_name */
  3798. #endif
  3799. );
  3800.  
  3801. extern void XStoreNamedColor(
  3802. #if NeedFunctionPrototypes
  3803.     Display*        /* display */,
  3804.     Colormap        /* colormap */,
  3805.     _Xconst char*    /* color */,
  3806.     unsigned long    /* pixel */,
  3807.     int            /* flags */
  3808. #endif
  3809. );
  3810.  
  3811. extern void XSync(
  3812. #if NeedFunctionPrototypes
  3813.     Display*        /* display */,
  3814.     Bool        /* discard */
  3815. #endif
  3816. );
  3817.  
  3818. extern void XTextExtents(
  3819. #if NeedFunctionPrototypes
  3820.     XFontStruct*    /* font_struct */,
  3821.     _Xconst char*    /* string */,
  3822.     int            /* nchars */,
  3823.     int*        /* direction_return */,
  3824.     int*        /* font_ascent_return */,
  3825.     int*        /* font_descent_return */,
  3826.     XCharStruct*    /* overall_return */
  3827. #endif
  3828. );
  3829.  
  3830. extern void XTextExtents16(
  3831. #if NeedFunctionPrototypes
  3832.     XFontStruct*    /* font_struct */,
  3833.     _Xconst XChar2b*    /* string */,
  3834.     int            /* nchars */,
  3835.     int*        /* direction_return */,
  3836.     int*        /* font_ascent_return */,
  3837.     int*        /* font_descent_return */,
  3838.     XCharStruct*    /* overall_return */
  3839. #endif
  3840. );
  3841.  
  3842. extern int XTextWidth(
  3843. #if NeedFunctionPrototypes
  3844.     XFontStruct*    /* font_struct */,
  3845.     _Xconst char*    /* string */,
  3846.     int            /* count */
  3847. #endif
  3848. );
  3849.  
  3850. extern int XTextWidth16(
  3851. #if NeedFunctionPrototypes
  3852.     XFontStruct*    /* font_struct */,
  3853.     _Xconst XChar2b*    /* string */,
  3854.     int            /* count */
  3855. #endif
  3856. );
  3857.  
  3858. extern Bool XTranslateCoordinates(
  3859. #if NeedFunctionPrototypes
  3860.     Display*        /* display */,
  3861.     Window        /* src_w */,
  3862.     Window        /* dest_w */,
  3863.     int            /* src_x */,
  3864.     int            /* src_y */,
  3865.     int*        /* dest_x_return */,
  3866.     int*        /* dest_y_return */,
  3867.     Window*        /* child_return */
  3868. #endif
  3869. );
  3870.  
  3871. extern void XUndefineCursor(
  3872. #if NeedFunctionPrototypes
  3873.     Display*        /* display */,
  3874.     Window        /* w */
  3875. #endif
  3876. );
  3877.  
  3878. extern void XUngrabButton(
  3879. #if NeedFunctionPrototypes
  3880.     Display*        /* display */,
  3881.     unsigned int    /* button */,
  3882.     unsigned int    /* modifiers */,
  3883.     Window        /* grab_window */
  3884. #endif
  3885. );
  3886.  
  3887. extern void XUngrabKey(
  3888. #if NeedFunctionPrototypes
  3889.     Display*        /* display */,
  3890.     int            /* keycode */,
  3891.     unsigned int    /* modifiers */,
  3892.     Window        /* grab_window */
  3893. #endif
  3894. );
  3895.  
  3896. extern void XUngrabKeyboard(
  3897. #if NeedFunctionPrototypes
  3898.     Display*        /* display */,
  3899.     Time        /* time */
  3900. #endif
  3901. );
  3902.  
  3903. extern void XUngrabPointer(
  3904. #if NeedFunctionPrototypes
  3905.     Display*        /* display */,
  3906.     Time        /* time */
  3907. #endif
  3908. );
  3909.  
  3910. extern void XUngrabServer(
  3911. #if NeedFunctionPrototypes
  3912.     Display*        /* display */
  3913. #endif
  3914. );
  3915.  
  3916. extern void XUninstallColormap(
  3917. #if NeedFunctionPrototypes
  3918.     Display*        /* display */,
  3919.     Colormap        /* colormap */
  3920. #endif
  3921. );
  3922.  
  3923. extern void XUnloadFont(
  3924. #if NeedFunctionPrototypes
  3925.     Display*        /* display */,
  3926.     Font        /* font */
  3927. #endif
  3928. );
  3929.  
  3930. extern void XUnmapSubwindows(
  3931. #if NeedFunctionPrototypes
  3932.     Display*        /* display */,
  3933.     Window        /* w */
  3934. #endif
  3935. );
  3936.  
  3937. extern void XUnmapWindow(
  3938. #if NeedFunctionPrototypes
  3939.     Display*        /* display */,
  3940.     Window        /* w */
  3941. #endif
  3942. );
  3943.  
  3944. extern int XVendorRelease(
  3945. #if NeedFunctionPrototypes
  3946.     Display*        /* display */
  3947. #endif
  3948. );
  3949.  
  3950. extern void XWarpPointer(
  3951. #if NeedFunctionPrototypes
  3952.     Display*        /* display */,
  3953.     Window        /* src_w */,
  3954.     Window        /* dest_w */,
  3955.     int            /* src_x */,
  3956.     int            /* src_y */,
  3957.     unsigned int    /* src_width */,
  3958.     unsigned int    /* src_height */,
  3959.     int            /* dest_x */,
  3960.     int            /* dest_y */         
  3961. #endif
  3962. );
  3963.  
  3964. extern int XWidthMMOfScreen(
  3965. #if NeedFunctionPrototypes
  3966.     Screen*        /* screen */
  3967. #endif
  3968. );
  3969.  
  3970. extern int XWidthOfScreen(
  3971. #if NeedFunctionPrototypes
  3972.     Screen*        /* screen */
  3973. #endif
  3974. );
  3975.  
  3976. extern void XWindowEvent(
  3977. #if NeedFunctionPrototypes
  3978.     Display*        /* display */,
  3979.     Window        /* w */,
  3980.     long        /* event_mask */,
  3981.     XEvent*        /* event_return */
  3982. #endif
  3983. );
  3984.  
  3985. extern int XWriteBitmapFile(
  3986. #if NeedFunctionPrototypes
  3987.     Display*        /* display */,
  3988.     _Xconst char*    /* filename */,
  3989.     Pixmap        /* bitmap */,
  3990.     unsigned int    /* width */,
  3991.     unsigned int    /* height */,
  3992.     int            /* x_hot */,
  3993.     int            /* y_hot */             
  3994. #endif
  3995. );
  3996.  
  3997. extern Bool XSupportsLocale(
  3998. #if NeedFunctionPrototypes
  3999.     void
  4000. #endif
  4001. );
  4002.  
  4003. extern char *XSetLocaleModifiers(
  4004. #if NeedFunctionPrototypes
  4005.     _Xconst char*    /* modifier_list */
  4006. #endif
  4007. );
  4008.  
  4009. extern XFontSet XCreateFontSet(
  4010. #if NeedFunctionPrototypes
  4011.     Display*        /* display */,
  4012.     _Xconst char*    /* base_font_name_list */,
  4013.     char***        /* missing_charset_list */,
  4014.     int*        /* missing_charset_count */,
  4015.     char**        /* def_string */
  4016. #endif
  4017. );
  4018.  
  4019. extern void XFreeFontSet(
  4020. #if NeedFunctionPrototypes
  4021.     Display*        /* display */,
  4022.     XFontSet        /* font_set */
  4023. #endif
  4024. );
  4025.  
  4026. extern int XFontsOfFontSet(
  4027. #if NeedFunctionPrototypes
  4028.     XFontSet        /* font_set */,
  4029.     XFontStruct***    /* font_struct_list */,
  4030.     char***        /* font_name_list */
  4031. #endif
  4032. );
  4033.  
  4034. extern char *XBaseFontNameListOfFontSet(
  4035. #if NeedFunctionPrototypes
  4036.     XFontSet        /* font_set */
  4037. #endif
  4038. );
  4039.  
  4040. extern char *XLocaleOfFontSet(
  4041. #if NeedFunctionPrototypes
  4042.     XFontSet        /* font_set */
  4043. #endif
  4044. );
  4045.  
  4046. extern Bool XContextDependentDrawing(
  4047. #if NeedFunctionPrototypes
  4048.     XFontSet        /* font_set */
  4049. #endif
  4050. );
  4051.  
  4052. extern XFontSetExtents *XExtentsOfFontSet(
  4053. #if NeedFunctionPrototypes
  4054.     XFontSet        /* font_set */
  4055. #endif
  4056. );
  4057.  
  4058. extern int XmbTextEscapement(
  4059. #if NeedFunctionPrototypes
  4060.     XFontSet        /* font_set */,
  4061.     _Xconst char*    /* text */,
  4062.     int            /* bytes_text */
  4063. #endif
  4064. );
  4065.  
  4066. extern int XwcTextEscapement(
  4067. #if NeedFunctionPrototypes
  4068.     XFontSet        /* font_set */,
  4069.     wchar_t*        /* text */,
  4070.     int            /* num_wchars */
  4071. #endif
  4072. );
  4073.  
  4074. extern int XmbTextExtents(
  4075. #if NeedFunctionPrototypes
  4076.     XFontSet        /* font_set */,
  4077.     _Xconst char*    /* text */,
  4078.     int            /* bytes_text */,
  4079.     XRectangle*        /* overall_ink_return */,
  4080.     XRectangle*        /* overall_logical_return */
  4081. #endif
  4082. );
  4083.  
  4084. extern int XwcTextExtents(
  4085. #if NeedFunctionPrototypes
  4086.     XFontSet        /* font_set */,
  4087.     wchar_t*        /* text */,
  4088.     int            /* num_wchars */,
  4089.     XRectangle*        /* overall_ink_return */,
  4090.     XRectangle*        /* overall_logical_return */
  4091. #endif
  4092. );
  4093.  
  4094. extern Status XmbTextPerCharExtents(
  4095. #if NeedFunctionPrototypes
  4096.     XFontSet        /* font_set */,
  4097.     _Xconst char*    /* text */,
  4098.     int            /* bytes_text */,
  4099.     XRectangle*        /* ink_extents_buffer */,
  4100.     XRectangle*        /* logical_extents_buffer */,
  4101.     int            /* buffer_size */,
  4102.     int*        /* num_chars */,
  4103.     XRectangle*        /* overall_ink_return */,
  4104.     XRectangle*        /* overall_logical_return */
  4105. #endif
  4106. );
  4107.  
  4108. extern Status XwcTextPerCharExtents(
  4109. #if NeedFunctionPrototypes
  4110.     XFontSet        /* font_set */,
  4111.     wchar_t*        /* text */,
  4112.     int            /* num_wchars */,
  4113.     XRectangle*        /* ink_extents_buffer */,
  4114.     XRectangle*        /* logical_extents_buffer */,
  4115.     int            /* buffer_size */,
  4116.     int*        /* num_chars */,
  4117.     XRectangle*        /* overall_ink_return */,
  4118.     XRectangle*        /* overall_logical_return */
  4119. #endif
  4120. );
  4121.  
  4122. extern void XmbDrawText(
  4123. #if NeedFunctionPrototypes
  4124.     Display*        /* display */,
  4125.     Drawable        /* d */,
  4126.     GC            /* gc */,
  4127.     int            /* x */,
  4128.     int            /* y */,
  4129.     XmbTextItem*    /* text_items */,
  4130.     int            /* nitems */
  4131. #endif
  4132. );
  4133.  
  4134. extern void XwcDrawText(
  4135. #if NeedFunctionPrototypes
  4136.     Display*        /* display */,
  4137.     Drawable        /* d */,
  4138.     GC            /* gc */,
  4139.     int            /* x */,
  4140.     int            /* y */,
  4141.     XwcTextItem*    /* text_items */,
  4142.     int            /* nitems */
  4143. #endif
  4144. );
  4145.  
  4146. extern void XmbDrawString(
  4147. #if NeedFunctionPrototypes
  4148.     Display*        /* display */,
  4149.     Drawable        /* d */,
  4150.     XFontSet        /* font_set */,
  4151.     GC            /* gc */,
  4152.     int            /* x */,
  4153.     int            /* y */,
  4154.     _Xconst char*    /* text */,
  4155.     int            /* bytes_text */
  4156. #endif
  4157. );
  4158.  
  4159. extern void XwcDrawString(
  4160. #if NeedFunctionPrototypes
  4161.     Display*        /* display */,
  4162.     Drawable        /* d */,
  4163.     XFontSet        /* font_set */,
  4164.     GC            /* gc */,
  4165.     int            /* x */,
  4166.     int            /* y */,
  4167.     wchar_t*        /* text */,
  4168.     int            /* num_wchars */
  4169. #endif
  4170. );
  4171.  
  4172. extern void XmbDrawImageString(
  4173. #if NeedFunctionPrototypes
  4174.     Display*        /* display */,
  4175.     Drawable        /* d */,
  4176.     XFontSet        /* font_set */,
  4177.     GC            /* gc */,
  4178.     int            /* x */,
  4179.     int            /* y */,
  4180.     _Xconst char*    /* text */,
  4181.     int            /* bytes_text */
  4182. #endif
  4183. );
  4184.  
  4185. extern void XwcDrawImageString(
  4186. #if NeedFunctionPrototypes
  4187.     Display*        /* display */,
  4188.     Drawable        /* d */,
  4189.     XFontSet        /* font_set */,
  4190.     GC            /* gc */,
  4191.     int            /* x */,
  4192.     int            /* y */,
  4193.     wchar_t*        /* text */,
  4194.     int            /* num_wchars */
  4195. #endif
  4196. );
  4197.  
  4198. extern XIM XOpenIM(
  4199. #if NeedFunctionPrototypes
  4200.     Display*            /* dpy */,
  4201.     struct _XrmHashBucketRec*    /* rdb */,
  4202.     char*            /* res_name */,
  4203.     char*            /* res_class */
  4204. #endif
  4205. );
  4206.  
  4207. extern Status XCloseIM(
  4208. #if NeedFunctionPrototypes
  4209.     XIM /* im */
  4210. #endif
  4211. );
  4212.  
  4213. extern char *XGetIMValues(
  4214. #if NeedVarargsPrototypes
  4215.     XIM /* im */, ...
  4216. #endif
  4217. );
  4218.  
  4219. extern Display *XDisplayOfIM(
  4220. #if NeedFunctionPrototypes
  4221.     XIM /* im */
  4222. #endif
  4223. );
  4224.  
  4225. extern char *XLocaleOfIM(
  4226. #if NeedFunctionPrototypes
  4227.     XIM /* im*/
  4228. #endif
  4229. );
  4230.  
  4231. extern XIC XCreateIC(
  4232. #if NeedVarargsPrototypes
  4233.     XIM /* im */, ...
  4234. #endif
  4235. );
  4236.  
  4237. extern void XDestroyIC(
  4238. #if NeedFunctionPrototypes
  4239.     XIC /* ic */
  4240. #endif
  4241. );
  4242.  
  4243. extern void XSetICFocus(
  4244. #if NeedFunctionPrototypes
  4245.     XIC /* ic */
  4246. #endif
  4247. );
  4248.  
  4249. extern void XUnsetICFocus(
  4250. #if NeedFunctionPrototypes
  4251.     XIC /* ic */
  4252. #endif
  4253. );
  4254.  
  4255. extern wchar_t *XwcResetIC(
  4256. #if NeedFunctionPrototypes
  4257.     XIC /* ic */
  4258. #endif
  4259. );
  4260.  
  4261. extern char *XmbResetIC(
  4262. #if NeedFunctionPrototypes
  4263.     XIC /* ic */
  4264. #endif
  4265. );
  4266.  
  4267. extern char *XSetICValues(
  4268. #if NeedVarargsPrototypes
  4269.     XIC /* ic */, ...
  4270. #endif
  4271. );
  4272.  
  4273. extern char *XGetICValues(
  4274. #if NeedVarargsPrototypes
  4275.     XIC /* ic */, ...
  4276. #endif
  4277. );
  4278.  
  4279. extern XIM XIMOfIC(
  4280. #if NeedFunctionPrototypes
  4281.     XIC /* ic */
  4282. #endif
  4283. );
  4284.  
  4285. extern Bool XFilterEvent(
  4286. #if NeedFunctionPrototypes
  4287.     XEvent*    /* event */,
  4288.     Window    /* window */
  4289. #endif
  4290. );
  4291.  
  4292. extern int XmbLookupString(
  4293. #if NeedFunctionPrototypes
  4294.     XIC            /* ic */,
  4295.     XKeyPressedEvent*    /* event */,
  4296.     char*        /* buffer_return */,
  4297.     int            /* bytes_buffer */,
  4298.     KeySym*        /* keysym_return */,
  4299.     Status*        /* status_return */
  4300. #endif
  4301. );
  4302.  
  4303. extern int XwcLookupString(
  4304. #if NeedFunctionPrototypes
  4305.     XIC            /* ic */,
  4306.     XKeyPressedEvent*    /* event */,
  4307.     wchar_t*        /* buffer_return */,
  4308.     int            /* wchars_buffer */,
  4309.     KeySym*        /* keysym_return */,
  4310.     Status*        /* status_return */
  4311. #endif
  4312. );
  4313.  
  4314. extern XVaNestedList XVaCreateNestedList(
  4315. #if NeedVarargsPrototypes
  4316.     int /*unused*/, ...
  4317. #endif
  4318. );
  4319.  
  4320. _XFUNCPROTOEND
  4321.  
  4322. #ifdef MAC_TCL
  4323. #   undef Cursor
  4324. #endif
  4325.  
  4326. #endif /* _XLIB_H_ */
  4327.